#43 Exception description in koji directive contains unnecessary whitespaces
Closed: Fixed Opened by jskladan.

Lines 42, 43 and 57, 58 of https://phab.qadevel.cloud.fedoraproject.org/diffusion/LTRN/browse/develop/libtaskotron/directives/koji_directive.py contain lines like these:

raise Exception("The koji directive requires both 'envr' and \
'arch' arguments. Detected arguments: %s" % detected_args)

This is not really a problem, just note the fact that the exception message is in fact
"The koji directive requires both 'tag' and 'arch' arguments. Detected arguments: %s"
not
"The koji directive requires both 'tag' and 'arch' arguments. Detected arguments: %s"
which was probably the intent.


This ticket had assigned some Differential requests:
D25

Just as a note, this is the way to do it properly:
raise Exception("The koji directive requires both 'envr' and" \
"'arch' arguments. Detected arguments: %s" % detected_args)

Note that adjacent string literals are concatenated at the "compile" time by Python, so no performance issues there ;)

Please make sure to go through the other files too, this is just one part where I noticed it.

double post..

Actually, the backslash is not needed:

raise Exception("The koji directive requires both 'envr' and"
      "'arch' arguments. Detected arguments: %s" % detected_args)

I have corrected it in D25.

Metadata