pkgset: Remove use of undefined variable
As long as the assertion is not violated, this would not be a problem as the second argument is not evaluated. However if the condition was broken, a NameError would be raised instead of AssertionError with a nice message. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
d037d61521
commit
7b880af0ad
@ -96,8 +96,7 @@ def get_module(session, module_info, strict=False):
|
|||||||
# returned, but otherwise we have to pick the one with the highest
|
# returned, but otherwise we have to pick the one with the highest
|
||||||
# release ourselves.
|
# release ourselves.
|
||||||
if 'variant_release' in query:
|
if 'variant_release' in query:
|
||||||
assert len(retval) <= 1, compose.log_error(
|
assert len(retval) <= 1, "More than one module returned from PDC: %s" % retval
|
||||||
"More than one module returned from PDC: %s" % str(retval))
|
|
||||||
module = retval[0]
|
module = retval[0]
|
||||||
else:
|
else:
|
||||||
module = retval[0]
|
module = retval[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user