From 774b3bb2c9a7fb3eefc49f0875d88293d3c44447 Mon Sep 17 00:00:00 2001 From: Rusty Bird Date: Wed, 14 Mar 2018 00:07:21 +0000 Subject: [PATCH 1/2] Call is_outdated() on volume object, not name Note that this is still a no-op, because admin.vm.volume.Info does not transmit is_outdated, so the qubesadmin wrapper defaults it to False. --- qubesmanager/table_widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubesmanager/table_widgets.py b/qubesmanager/table_widgets.py index 9c4ae02..e8df9d2 100644 --- a/qubesmanager/table_widgets.py +++ b/qubesmanager/table_widgets.py @@ -377,7 +377,7 @@ class VmUpdateInfoWidget(QtGui.QWidget): outdated_state = False try: - for vol in vm.volumes: + for vol in vm.volumes.values(): if vol.is_outdated(): outdated_state = "outdated" break From 24dcb4802e9cef364f53a65eedb7d0f6c0032b08 Mon Sep 17 00:00:00 2001 From: Rusty Bird Date: Wed, 14 Mar 2018 00:07:22 +0000 Subject: [PATCH 2/2] Don't catch AttributeError for is_outdated() call anymore --- qubesmanager/table_widgets.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/qubesmanager/table_widgets.py b/qubesmanager/table_widgets.py index e8df9d2..36d52e8 100644 --- a/qubesmanager/table_widgets.py +++ b/qubesmanager/table_widgets.py @@ -376,13 +376,10 @@ class VmUpdateInfoWidget(QtGui.QWidget): outdated_state = False - try: - for vol in vm.volumes.values(): - if vol.is_outdated(): - outdated_state = "outdated" - break - except AttributeError: - pass + for vol in vm.volumes.values(): + if vol.is_outdated(): + outdated_state = "outdated" + break if not outdated_state and getattr(vm, 'template', None)\ and vm.template.is_running():