fix a few errors revealed by pylint
This commit is contained in:
parent
1e8b7211ee
commit
7a6544a53d
2 changed files with 4 additions and 3 deletions
3
cli/koji
3
cli/koji
|
|
@ -31,7 +31,6 @@ try:
|
|||
import ast
|
||||
except ImportError:
|
||||
ast = None
|
||||
pass
|
||||
import ConfigParser
|
||||
import base64
|
||||
import errno
|
||||
|
|
@ -5202,7 +5201,7 @@ def _build_image_indirection(options, task_opts, session, args):
|
|||
|
||||
tmp_target = session.getBuildTarget(task_opts.target)
|
||||
if not tmp_target:
|
||||
raise koji.GenericError, _("Unknown build target: %s" % target)
|
||||
raise koji.GenericError, _("Unknown build target: %s" % tmp_target)
|
||||
dest_tag = session.getTag(tmp_target['dest_tag'])
|
||||
if not dest_tag:
|
||||
raise koji.GenericError, _("Unknown destination tag: %s" %
|
||||
|
|
|
|||
|
|
@ -142,8 +142,10 @@ def dslice_ex(dict, keys, strict=True):
|
|||
del ret[key]
|
||||
return ret
|
||||
|
||||
def call_with_argcheck(func, args, kwargs={}):
|
||||
def call_with_argcheck(func, args, kwargs=None):
|
||||
"""Call function, raising ParameterError if args do not match"""
|
||||
if kwargs is None:
|
||||
kwargs = {}
|
||||
try:
|
||||
return func(*args, **kwargs)
|
||||
except TypeError, e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue