Skip to content

Commit

Permalink
Remove unnecessary assert
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
strugee committed Apr 8, 2019
1 parent 7f51212 commit a443e33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qubesmanager/global_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a443e33

Please sign in to comment.