Преглед на файлове

Remove unnecessary assert

First of all, the method that was being called has asserts of its own,
so it's guaranteed to either succeed or crash the program with
AssertionError. Second, asserts are optimized out by the interpreter
when -O is passed. Therefore, this code is buggy because it sometimes
wouldn't be run, but we need the side effects.
AJ Jordan преди 5 години
родител
ревизия
047cfbc407
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      qubesmanager/global_settings.py

+ 1 - 1
qubesmanager/global_settings.py

@@ -51,7 +51,7 @@ def _run_qrexec_repo(service, arg=''):
 
 def _manage_repos(repolist, action):
     for i in repolist:
-        assert _run_qrexec_repo('qubes.repos.' + action, i) == 'ok\n'
+        _run_qrexec_repo('qubes.repos.' + action, i) == 'ok\n'
 
 def _handle_dom0_updates_combobox(idx):
     idx += 1