Pylint fixes
Several minor fixes for updated pylint checker.
This commit is contained in:
parent
32078242c9
commit
5d88e5f851
@ -25,9 +25,7 @@ from qubesadmin import exc
|
||||
from qubesadmin import utils as admin_utils
|
||||
from qubes.storage.file import get_disk_usage
|
||||
|
||||
from PyQt5 import QtCore # pylint: disable=import-error
|
||||
from PyQt5 import QtWidgets # pylint: disable=import-error
|
||||
from PyQt5 import QtGui
|
||||
from PyQt5 import QtCore, QtWidgets, QtGui # pylint: disable=import-error
|
||||
from . import ui_backupdlg # pylint: disable=no-name-in-module
|
||||
from . import multiselectwidget
|
||||
|
||||
@ -36,10 +34,7 @@ from . import utils
|
||||
|
||||
import grp
|
||||
import pwd
|
||||
import sys
|
||||
import os
|
||||
import asyncio
|
||||
from contextlib import suppress
|
||||
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
|
@ -33,6 +33,7 @@ class VMBootFromDeviceWindow(ui_bootfromdevice.Ui_BootDialog,
|
||||
|
||||
self.vm = vm
|
||||
self.qapp = qapp
|
||||
self.qubesapp = qubesapp
|
||||
|
||||
self.setupUi(self)
|
||||
self.setWindowTitle(
|
||||
|
@ -326,7 +326,6 @@ class QubesFirewallRulesModel(QtCore.QAbstractItemModel):
|
||||
if rule.action == 'accept':
|
||||
conf['rules'].insert(0, rule)
|
||||
continue
|
||||
else:
|
||||
raise FirewallModifiedOutsideError('No blacklist support.')
|
||||
|
||||
if rule.expire is not None and rule.dsthost is None \
|
||||
|
@ -40,7 +40,8 @@ def _run_qrexec_repo(service, arg=''):
|
||||
p = subprocess.run(
|
||||
['sudo', cmd, arg],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE
|
||||
stderr=subprocess.PIPE,
|
||||
check=False
|
||||
)
|
||||
if p.stderr:
|
||||
raise RuntimeError('qrexec call stderr was not empty',
|
||||
|
@ -664,7 +664,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtWidgets.QMainWindow):
|
||||
QtCore.QSize(1100, 600)))
|
||||
|
||||
def get_vms_list(self):
|
||||
return [vm for vm in self.qubes_app.domains]
|
||||
return list(self.qubes_app.domains)
|
||||
|
||||
def fill_table(self):
|
||||
self.table.setSortingEnabled(False)
|
||||
|
@ -35,7 +35,7 @@ from . import utils
|
||||
|
||||
from multiprocessing import Queue
|
||||
from queue import Empty
|
||||
from qubesadmin import Qubes, exc
|
||||
from qubesadmin import exc
|
||||
from qubesadmin.backup import restore
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ import sys
|
||||
import quamash
|
||||
from qubesadmin import events
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt5 import QtWidgets # pylint: disable=import-error
|
||||
from PyQt5.QtGui import QIcon # pylint: disable=import-error
|
||||
|
||||
|
||||
@ -235,7 +235,7 @@ def loop_shutdown():
|
||||
# Copyright (c) 2002-2007 Pascal Varet <p.varet@gmail.com>
|
||||
def handle_exception(exc_type, exc_value, exc_traceback):
|
||||
|
||||
filename, line, dummy, dummy = traceback.extract_tb(exc_traceback).pop()
|
||||
filename, line, _, _ = traceback.extract_tb(exc_traceback).pop()
|
||||
filename = os.path.basename(filename)
|
||||
error = "%s: %s" % (exc_type.__name__, exc_value)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user