britney_util: Replace broken if with an assert

Replace a "if" with an unconditionally false condition with a negative
assert of the "correct" condition.  The bug has been present for 2½
years with no known adverse effects.

Signed-off-by: Niels Thykier <niels@thykier.net>
master
Niels Thykier 9 years ago
parent ec37bd06aa
commit e92bbf386f

@ -148,9 +148,7 @@ def undo_changes(lundo, inst_tester, sources, binaries, all_binary_packages,
inst_tester.remove_testing_binary(binary, version, arch)
else:
binaries_t_a = binaries['testing'][arch][0]
if p in binaries_t_a:
rmpkgdata = binaries_t_a[p]
inst_tester.remove_testing_binary((binary, rmpkgdata.version, arch))
assert binary not in binaries_t_a
pkgdata = all_binary_packages[undo['binaries'][p]]
binaries_t_a[binary] = pkgdata
inst_tester.add_testing_binary((binary, pkgdata.version, arch))

Loading…
Cancel
Save