Use asserts to guard single binary removal items

Coverage suggests that the conditions are always true.  If so, we can
replace the "elif" with a regular "if" - but for now, lets keep an
assert.

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

@ -2101,7 +2101,8 @@ class Britney(object):
# single binary removal; used for clearing up after smooth
# updates but not supported as a manual hint
elif source_name in binaries_t[migration_architecture][0]:
else:
assert source_name in binaries_t[migration_architecture][0]
version = binaries_t[migration_architecture][0][source_name].version
rms.add((source_name, version, migration_architecture))
@ -2229,7 +2230,8 @@ class Britney(object):
# single binary removal; used for clearing up after smooth
# updates but not supported as a manual hint
elif item.package in packages_t[item.architecture][0]:
else:
assert item.package in packages_t[item.architecture][0]
binaries_t_a = packages_t[item.architecture][0]
pkg_id = binaries_t_a[item.package].pkg_id
undo['binaries'][(item.package, item.architecture)] = pkg_id

Loading…
Cancel
Save