From 629f16f24c16dcab1560202413be5d4dd726f746 Mon Sep 17 00:00:00 2001 From: donoban Date: Thu, 22 Oct 2020 19:24:13 +0200 Subject: [PATCH 01/16] Fix SelectionMode on ui file --- qubesmanager/qube_manager.py | 1 - ui/qubemanager.ui | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 91f290e..ecdb867 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -715,7 +715,6 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): self.table.setModel(self.proxy) self.table.setItemDelegateForColumn(3, StateIconDelegate()) self.table.resizeColumnsToContents() - self.table.setSelectionMode(QAbstractItemView.ExtendedSelection) selection_model = self.table.selectionModel() selection_model.selectionChanged.connect(self.table_selection_changed) diff --git a/ui/qubemanager.ui b/ui/qubemanager.ui index 47fd249..b33b6f8 100644 --- a/ui/qubemanager.ui +++ b/ui/qubemanager.ui @@ -108,7 +108,7 @@ true - QAbstractItemView::SingleSelection + QAbstractItemView::ExtendedSelection QAbstractItemView::SelectRows From 0200f2a0b40bc0c8b9dc5a572a9f500cf916cd0b Mon Sep 17 00:00:00 2001 From: donoban Date: Mon, 26 Oct 2020 14:34:48 +0100 Subject: [PATCH 02/16] Added 'Show' Checkboxes to .ui --- ui/qubemanager.ui | 196 +++++++++++++++++++--------------------------- 1 file changed, 79 insertions(+), 117 deletions(-) diff --git a/ui/qubemanager.ui b/ui/qubemanager.ui index b33b6f8..a5a641a 100644 --- a/ui/qubemanager.ui +++ b/ui/qubemanager.ui @@ -52,23 +52,6 @@ QLayout::SetDefaultConstraint - - - - 6 - - - 6 - - - - - Search: - - - - - @@ -134,108 +117,87 @@ false - - - Nowy wiersz - - - - - - - - - - - - - - - - - - - - - - - - Name - - - Qube name - - - - - State - - - Update info - - - - - Template - - - Qube template - - - - - NetVM - - - Qube netVM - - - - - Disk -usage - - - - - Internal - - - - - IP - - - - - Include -in backups - - - - - Last backup - - - - - Default DisposableVM -Template - - - - - DisposableVM -Template - - - - - Virtualization Mode - - + + + + 6 + + + 6 + + + + + Search: + + + + + + + Show: + + + + + + + Running + + + + + + + Halted + + + + + + + Network + + + + + + + Templates + + + + + + + Standalone + + + + + + + All + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + From 0794a60e4c61406e8aa1c355fe91197c39fa7d22 Mon Sep 17 00:00:00 2001 From: donoban Date: Tue, 27 Oct 2020 00:46:24 +0100 Subject: [PATCH 03/16] Added filterAcceptsRow() to QubesProxyModel Created _init_context_menu() due pylint warning (too much statements) --- qubesmanager/qube_manager.py | 94 +++++++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 28 deletions(-) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index ecdb867..682ebf5 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -621,8 +621,11 @@ class RunCommandThread(common_threads.QubesThread): except (ChildProcessError, exc.QubesException) as ex: self.msg = (self.tr("Error while running command!"), str(ex)) - class QubesProxyModel(QSortFilterProxyModel): + def __init__(self, window): + super().__init__() + self.window = window + def lessThan(self, left, right): if left.data(self.sortRole()) != right.data(self.sortRole()): return super().lessThan(left, right) @@ -632,6 +635,31 @@ class QubesProxyModel(QSortFilterProxyModel): return left_vm.name.lower() < right_vm.name.lower() + # pylint: disable=too-many-return-statements + def filterAcceptsRow(self, sourceRow, sourceParent): + if self.window.show_all.isChecked(): + return super().filterAcceptsRow(sourceRow, sourceParent) + + index = self.sourceModel().index(sourceRow, 0, sourceParent) + vm = self.sourceModel().data(index, Qt.UserRole) + + if self.window.show_running.isChecked() and \ + vm.state['power'] == 'Running': + return super().filterAcceptsRow(sourceRow, sourceParent) + if self.window.show_halted.isChecked() and \ + vm.state['power'] == 'Halted': + return super().filterAcceptsRow(sourceRow, sourceParent) + if self.window.show_network.isChecked() and \ + getattr(vm.vm, 'provides_network', False): + return super().filterAcceptsRow(sourceRow, sourceParent) + if self.window.show_templates.isChecked() and vm.klass == 'TemplateVM': + return super().filterAcceptsRow(sourceRow, sourceParent) + if self.window.show_standalone.isChecked() \ + and vm.klass == 'StandaloneVM': + return super().filterAcceptsRow(sourceRow, sourceParent) + + return False + class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): # suppress saving settings while initializing widgets @@ -650,38 +678,14 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): self.searchbox.setValidator(QRegExpValidator( QRegExp("[a-zA-Z0-9_-]*", Qt.CaseInsensitive), None)) self.searchbox.textChanged.connect(self.do_search) - self.searchContainer.addWidget(self.searchbox) + self.searchContainer.insertWidget(1, self.searchbox) self.settings_windows = {} self.frame_width = 0 self.frame_height = 0 - self.context_menu = QMenu(self) - - self.context_menu.addAction(self.action_settings) - self.context_menu.addAction(self.action_editfwrules) - self.context_menu.addAction(self.action_appmenus) - self.context_menu.addAction(self.action_set_keyboard_layout) - self.context_menu.addSeparator() - - self.context_menu.addAction(self.action_updatevm) - self.context_menu.addAction(self.action_run_command_in_vm) - self.context_menu.addAction(self.action_open_console) - self.context_menu.addAction(self.action_resumevm) - self.context_menu.addAction(self.action_startvm_tools_install) - self.context_menu.addAction(self.action_pausevm) - self.context_menu.addAction(self.action_shutdownvm) - self.context_menu.addAction(self.action_restartvm) - self.context_menu.addAction(self.action_killvm) - self.context_menu.addSeparator() - - self.context_menu.addAction(self.action_clonevm) - self.context_menu.addAction(self.action_removevm) - self.context_menu.addSeparator() - - self.context_menu.addMenu(self.logs_menu) - self.context_menu.addSeparator() + self.__init_context_menu() self.tools_context_menu = QMenu(self) self.tools_context_menu.addAction(self.action_toolbar) @@ -704,7 +708,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): self.fill_cache() self.qubes_model = QubesTableModel(self.qubes_cache) - self.proxy = QubesProxyModel() + self.proxy = QubesProxyModel(self) self.proxy.setSourceModel(self.qubes_model) self.proxy.setSortRole(Qt.UserRole + 1) self.proxy.setSortCaseSensitivity(Qt.CaseInsensitive) @@ -712,6 +716,13 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): self.proxy.setFilterCaseSensitivity(Qt.CaseInsensitive) self.proxy.layoutChanged.connect(self.save_sorting) + self.show_running.stateChanged.connect(self.invalidate) + self.show_halted.stateChanged.connect(self.invalidate) + self.show_network.stateChanged.connect(self.invalidate) + self.show_templates.stateChanged.connect(self.invalidate) + self.show_standalone.stateChanged.connect(self.invalidate) + self.show_all.stateChanged.connect(self.invalidate) + self.table.setModel(self.proxy) self.table.setItemDelegateForColumn(3, StateIconDelegate()) self.table.resizeColumnsToContents() @@ -784,12 +795,39 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): self.check_updates() + def __init_context_menu(self): + self.context_menu = QMenu(self) + self.context_menu.addAction(self.action_settings) + self.context_menu.addAction(self.action_editfwrules) + self.context_menu.addAction(self.action_appmenus) + self.context_menu.addAction(self.action_set_keyboard_layout) + self.context_menu.addSeparator() + self.context_menu.addAction(self.action_updatevm) + self.context_menu.addAction(self.action_run_command_in_vm) + self.context_menu.addAction(self.action_open_console) + self.context_menu.addAction(self.action_resumevm) + self.context_menu.addAction(self.action_startvm_tools_install) + self.context_menu.addAction(self.action_pausevm) + self.context_menu.addAction(self.action_shutdownvm) + self.context_menu.addAction(self.action_restartvm) + self.context_menu.addAction(self.action_killvm) + self.context_menu.addSeparator() + self.context_menu.addAction(self.action_clonevm) + self.context_menu.addAction(self.action_removevm) + self.context_menu.addSeparator() + self.context_menu.addMenu(self.logs_menu) + self.context_menu.addSeparator() + def save_sorting(self): self.manager_settings.setValue('view/sort_column', self.proxy.sortColumn()) self.manager_settings.setValue('view/sort_order', self.proxy.sortOrder()) + def invalidate(self): + self.proxy.invalidate() + self.table.resizeColumnsToContents() + def fill_cache(self): progress = QProgressDialog( self.tr( From ca1b41ecea6d656995b8b77055c7da027fefffc1 Mon Sep 17 00:00:00 2001 From: donoban Date: Tue, 27 Oct 2020 00:48:26 +0100 Subject: [PATCH 04/16] Enable 'Show' checkboxes by default --- ui/qubemanager.ui | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ui/qubemanager.ui b/ui/qubemanager.ui index a5a641a..761f2f1 100644 --- a/ui/qubemanager.ui +++ b/ui/qubemanager.ui @@ -146,6 +146,9 @@ Running + + true + @@ -153,6 +156,9 @@ Halted + + true + @@ -160,6 +166,9 @@ Network + + true + @@ -167,6 +176,9 @@ Templates + + true + @@ -174,6 +186,9 @@ Standalone + + true + @@ -181,6 +196,9 @@ All + + true + From 8b8ab7c474eed0344acf79b47646c0c9241d60d9 Mon Sep 17 00:00:00 2001 From: donoban Date: Tue, 27 Oct 2020 23:32:58 +0100 Subject: [PATCH 05/16] Removed unused import --- qubesmanager/qube_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 682ebf5..fac9ea1 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -37,7 +37,7 @@ from PyQt5.QtCore import (Qt, QAbstractTableModel, QObject, pyqtSlot, QEvent, # pylint: disable=import-error from PyQt5.QtWidgets import (QLineEdit, QStyledItemDelegate, QToolTip, QMenu, QInputDialog, QMainWindow, QProgressDialog, QStyleOptionViewItem, - QAbstractItemView, QMessageBox) + QMessageBox) # pylint: disable=import-error from PyQt5.QtGui import (QIcon, QPixmap, QRegExpValidator, QFont, QColor) From 526dbd5aad0b69494a31c37666f4fb2779f6d5a3 Mon Sep 17 00:00:00 2001 From: donoban Date: Sun, 1 Nov 2020 13:51:53 +0100 Subject: [PATCH 06/16] Added saving and restore settings for showing checkboxes --- qubesmanager/qube_manager.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index fac9ea1..9a978fe 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -818,6 +818,14 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): self.context_menu.addMenu(self.logs_menu) self.context_menu.addSeparator() + def save_showing(self): + self.manager_settings.setValue('show/running', self.show_running.isChecked()) + self.manager_settings.setValue('show/halted', self.show_halted.isChecked()) + self.manager_settings.setValue('show/network', self.show_network.isChecked()) + self.manager_settings.setValue('show/templates', self.show_templates.isChecked()) + self.manager_settings.setValue('show/standalone', self.show_standalone.isChecked()) + self.manager_settings.setValue('show/all', self.show_all.isChecked()) + def save_sorting(self): self.manager_settings.setValue('view/sort_column', self.proxy.sortColumn()) @@ -976,6 +984,20 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): defaultValue=True): self.action_toolbar.setChecked(False) + # Restore show checkboxes + self.show_running.setChecked(self.manager_settings.value( + 'show/running', "true") == "true") + self.show_halted.setChecked(self.manager_settings.value( + 'show/halted', "true") == "true") + self.show_network.setChecked(self.manager_settings.value( + 'show/network', "true") == "true") + self.show_templates.setChecked(self.manager_settings.value( + 'show/templates', "true") == "true") + self.show_standalone.setChecked(self.manager_settings.value( + 'show/standalone', "true") == "true") + self.show_all.setChecked(self.manager_settings.value( + 'show/all', "true") == "true") + # load last window size self.resize(self.manager_settings.value("window_size", QSize(1100, 600))) @@ -1292,6 +1314,9 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): "\nError: {}".format(str(ex)))) return + def closeEvent(self, event): + self.save_showing() + # noinspection PyArgumentList @pyqtSlot(name='on_action_settings_triggered') def action_settings_triggered(self): From bdaa421a9c56551ce362376a8505d4b61299284b Mon Sep 17 00:00:00 2001 From: donoban Date: Sun, 1 Nov 2020 14:02:57 +0100 Subject: [PATCH 07/16] Fix pylint warnings --- qubesmanager/qube_manager.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 9a978fe..ebb5d5e 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -819,11 +819,16 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): self.context_menu.addSeparator() def save_showing(self): - self.manager_settings.setValue('show/running', self.show_running.isChecked()) - self.manager_settings.setValue('show/halted', self.show_halted.isChecked()) - self.manager_settings.setValue('show/network', self.show_network.isChecked()) - self.manager_settings.setValue('show/templates', self.show_templates.isChecked()) - self.manager_settings.setValue('show/standalone', self.show_standalone.isChecked()) + self.manager_settings.setValue('show/running', + self.show_running.isChecked()) + self.manager_settings.setValue('show/halted', + self.show_halted.isChecked()) + self.manager_settings.setValue('show/network', + self.show_network.isChecked()) + self.manager_settings.setValue('show/templates', + self.show_templates.isChecked()) + self.manager_settings.setValue('show/standalone', + self.show_standalone.isChecked()) self.manager_settings.setValue('show/all', self.show_all.isChecked()) def save_sorting(self): @@ -992,7 +997,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): self.show_network.setChecked(self.manager_settings.value( 'show/network', "true") == "true") self.show_templates.setChecked(self.manager_settings.value( - 'show/templates', "true") == "true") + 'show/templates', "true") == "true") self.show_standalone.setChecked(self.manager_settings.value( 'show/standalone', "true") == "true") self.show_all.setChecked(self.manager_settings.value( @@ -1314,7 +1319,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): "\nError: {}".format(str(ex)))) return - def closeEvent(self, event): + def closeEvent(self, _): self.save_showing() # noinspection PyArgumentList From ad63ac7de9a1e019d9844d14b6df6e4a4108d20b Mon Sep 17 00:00:00 2001 From: donoban Date: Sun, 1 Nov 2020 16:37:38 +0100 Subject: [PATCH 08/16] Restored removed lines by accident (although I think that are useless at this moment) --- ui/qubemanager.ui | 100 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/ui/qubemanager.ui b/ui/qubemanager.ui index 761f2f1..a543d42 100644 --- a/ui/qubemanager.ui +++ b/ui/qubemanager.ui @@ -117,6 +117,106 @@ false + + + Nowy wiersz + + + + + + + + + + + + + + + + + + + + + + + + Name + + + Qube name + + + + + State + + + Update info + + + + + Template + + + Qube template + + + + + NetVM + + + Qube netVM + + + + + Disk +usage + + + + + Internal + + + + + IP + + + + + Include +in backups + + + + + Last backup + + + + + Default DisposableVM +Template + + + + + DisposableVM +Template + + + + + Virtualization Mode + + From f2501c91a51eb66ff6cadaf62830b4c49b540a06 Mon Sep 17 00:00:00 2001 From: donoban Date: Wed, 4 Nov 2020 23:37:21 +0100 Subject: [PATCH 09/16] Added 'Compact View' Action --- qubesmanager/qube_manager.py | 9 +++++++++ ui/qubemanager.ui | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 91023d1..63733c6 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -702,6 +702,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): lambda pos: self.open_tools_context_menu(self.toolbar, pos)) self.action_menubar.toggled.connect(self.showhide_menubar) self.action_toolbar.toggled.connect(self.showhide_toolbar) + self.action_compact_view.toggled.connect(self.set_compactview) self.logs_menu.triggered.connect(self.show_log) self.table.resizeColumnsToContents() @@ -742,6 +743,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): self.menu_view.addSeparator() self.menu_view.addAction(self.action_toolbar) self.menu_view.addAction(self.action_menubar) + self.menu_view.addSeparator() + self.menu_view.addAction(self.action_compact_view) try: self.load_manager_settings() @@ -1390,6 +1393,12 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): def action_exit_triggered(self): self.close() + def set_compactview(self, checked): + if checked: + self.toolbar.setToolButtonStyle(Qt.ToolButtonIconOnly) + else: + self.toolbar.setToolButtonStyle(Qt.ToolButtonTextUnderIcon) + def showhide_menubar(self, checked): self.menubar.setVisible(checked) if not checked: diff --git a/ui/qubemanager.ui b/ui/qubemanager.ui index 47fd249..b0257d9 100644 --- a/ui/qubemanager.ui +++ b/ui/qubemanager.ui @@ -869,6 +869,14 @@ Template Open a secure Xen console in the qube. Useful chiefly for debugging purposes: for normal operation, use "Run Terminal" from the Domains widget. + + + true + + + Compact View + + From 1c7494e29ee23402d36eb46973cb02e2c4e092ce Mon Sep 17 00:00:00 2001 From: donoban Date: Wed, 4 Nov 2020 23:51:31 +0100 Subject: [PATCH 10/16] Save 'compactview' state --- qubesmanager/qube_manager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 63733c6..2426a59 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -950,6 +950,9 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): if not self.manager_settings.value("view/toolbar_visible", defaultValue=True): self.action_toolbar.setChecked(False) + if self.manager_settings.value("view/compactview", + defaultValue="false") != "false": + self.action_compact_view.setChecked(True) # load last window size self.resize(self.manager_settings.value("window_size", @@ -1398,6 +1401,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow): self.toolbar.setToolButtonStyle(Qt.ToolButtonIconOnly) else: self.toolbar.setToolButtonStyle(Qt.ToolButtonTextUnderIcon) + if self.settings_loaded: + self.manager_settings.setValue('view/compactview', checked) def showhide_menubar(self, checked): self.menubar.setVisible(checked) From 0bb58a9aa9da7a6b1e32d6392f3dda8a02e499b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Tue, 10 Nov 2020 11:49:53 +0100 Subject: [PATCH 11/16] debian: use recommended build qt5 dependency pkg --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index ebfaee6..78f87df 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: dh-python, python3-all, python3-setuptools, - qt5-default, + qtbase5-dev, qttools5-dev-tools, pyqt5-dev-tools Standards-Version: 4.3.0 From 1b0f96a7563bee398d698fbe0bb16c9b809a0752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 11 Nov 2020 05:02:44 +0100 Subject: [PATCH 12/16] debian: make sure qt5 build tools are used Specifically avoid `lrelease` call be confused with qt4 variant. --- debian/rules | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/rules b/debian/rules index f2b3a6b..465c69f 100755 --- a/debian/rules +++ b/debian/rules @@ -2,6 +2,7 @@ include /usr/share/dpkg/default.mk export DESTDIR=$(shell pwd)/debian/tmp +export QT_SELECT=qt5 %: dh $@ --with python3 --buildsystem=pybuild From dc38ab0d3ffc07f6d1bf71766c785ceb8d24ad65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Sun, 15 Nov 2020 23:33:55 +0100 Subject: [PATCH 13/16] Add .gitlab-ci.yml --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f55a019 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,7 @@ +include: + - project: 'QubesOS/qubes-continuous-integration' + file: '/r4.1/gitlab-base.yml' + - project: 'QubesOS/qubes-continuous-integration' + file: '/r4.1/gitlab-dom0.yml' + - project: 'QubesOS/qubes-continuous-integration' + file: '/r4.1/gitlab-vm.yml' From 89ec0848c6868236b04ef02dca76472f7d8243d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 2 Dec 2020 22:33:55 +0100 Subject: [PATCH 14/16] Move pylintrc to the top directory --- ci/pylintrc => .pylintrc | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ci/pylintrc => .pylintrc (100%) diff --git a/ci/pylintrc b/.pylintrc similarity index 100% rename from ci/pylintrc rename to .pylintrc From d5abe7b341fbf2dfeebfbf70fc366d14ada226f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 2 Dec 2020 21:19:29 +0100 Subject: [PATCH 15/16] gitlab-ci: add pylint job --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f55a019..1d70b52 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,3 +5,10 @@ include: file: '/r4.1/gitlab-dom0.yml' - project: 'QubesOS/qubes-continuous-integration' file: '/r4.1/gitlab-vm.yml' + +checks:pylint: + stage: checks + before_script: + - pip3 install --quiet -r ci/requirements.txt + script: + - PYTHONPATH="test-packages:$PYTHONPATH" python3 -m pylint qubesmanager From b4d6080f7b395f3b8e5964ae01574ee0e26d606d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 3 Dec 2020 00:59:13 +0100 Subject: [PATCH 16/16] Fix asyncio.all_tasks() call --- qubesmanager/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubesmanager/utils.py b/qubesmanager/utils.py index 7fb10ea..6b7d828 100644 --- a/qubesmanager/utils.py +++ b/qubesmanager/utils.py @@ -459,7 +459,7 @@ def format_dependencies_list(dependencies): def loop_shutdown(): - pending = asyncio.Task.all_tasks() + pending = asyncio.all_tasks() for task in pending: with suppress(asyncio.CancelledError): task.cancel()