Browse Source

Removed not needed workaround for check-updates on dom0

And fixed test referring to it.
Marta Marczykowska-Górecka 4 years ago
parent
commit
74eba3bb7f
2 changed files with 2 additions and 9 deletions
  1. 1 7
      qubesmanager/global_settings.py
  2. 1 2
      qubesmanager/tests/test_global_settings.py

+ 1 - 7
qubesmanager/global_settings.py

@@ -20,8 +20,6 @@
 #
 #
 
-import os
-import os.path
 import subprocess
 from PyQt5 import QtWidgets  # pylint: disable=import-error
 
@@ -245,15 +243,11 @@ class GlobalSettingsWindow(ui_globalsettingsdlg.Ui_GlobalSettings,
                 qmemman_config_file.close()
 
     def __init_updates__(self):
-        # TODO: remove workaround when it is no longer needed
-        self.dom0_updates_file_path = '/var/lib/qubes/updates/disable-updates'
-
         try:
             self.updates_dom0_val = bool(self.qvm_collection.domains[
                 'dom0'].features['service.qubes-update-check'])
         except KeyError:
-            self.updates_dom0_val =\
-                not os.path.isfile(self.dom0_updates_file_path)
+            self.updates_dom0_val = True
 
         self.updates_dom0.setChecked(self.updates_dom0_val)
 

+ 1 - 2
qubesmanager/tests/test_global_settings.py

@@ -128,8 +128,7 @@ class GlobalSettingsTest(unittest.TestCase):
             dom0_updates = self.qapp.domains[
                 'dom0'].features['service.qubes-update-check']
         except KeyError:
-            self.skipTest("check_updates_dom0 property not implemented")
-            return
+            dom0_updates = True
 
         self.assertEqual(bool(dom0_updates),
                          self.dialog.updates_dom0.isChecked(),