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:
Lubomír Sedlář 2017-05-04 11:26:01 +02:00
parent d037d61521
commit 7b880af0ad
1 changed files with 1 additions and 2 deletions

View File

@ -96,8 +96,7 @@ def get_module(session, module_info, strict=False):
# returned, but otherwise we have to pick the one with the highest
# release ourselves.
if 'variant_release' in query:
assert len(retval) <= 1, compose.log_error(
"More than one module returned from PDC: %s" % str(retval))
assert len(retval) <= 1, "More than one module returned from PDC: %s" % retval
module = retval[0]
else:
module = retval[0]