fix additional flake8 problems
This commit is contained in:
parent
1ac3ae1fd1
commit
64a0033150
6 changed files with 18 additions and 18 deletions
|
|
@ -2612,7 +2612,7 @@ def anon_handle_list_untagged(goptions, session, args):
|
|||
if refs.get('rpms'):
|
||||
r.append("rpms: %s" % refs['rpms'])
|
||||
if refs.get('component_of'):
|
||||
r.append("images/archives: %" % refs['component_of'])
|
||||
r.append("images/archives: %s" % refs['component_of'])
|
||||
if refs.get('archives'):
|
||||
r.append("archives buildroots: %s" % refs['archives'])
|
||||
build['refs'] = ', '.join(r)
|
||||
|
|
|
|||
24
koji/util.py
24
koji/util.py
|
|
@ -123,18 +123,18 @@ def duration(start):
|
|||
return '%s:%02i' % (mins, secs)
|
||||
|
||||
|
||||
def printList(l):
|
||||
def printList(lst):
|
||||
"""Print the contents of the list comma-separated"""
|
||||
if len(l) == 0:
|
||||
if len(lst) == 0:
|
||||
return ''
|
||||
elif len(l) == 1:
|
||||
return l[0]
|
||||
elif len(l) == 2:
|
||||
return ' and '.join(l)
|
||||
elif len(lst) == 1:
|
||||
return lst[0]
|
||||
elif len(lst) == 2:
|
||||
return ' and '.join(lst)
|
||||
else:
|
||||
ret = ', '.join(l[:-1])
|
||||
ret = ', '.join(lst[:-1])
|
||||
ret += ', and '
|
||||
ret += l[-1]
|
||||
ret += lst[-1]
|
||||
return ret
|
||||
|
||||
|
||||
|
|
@ -838,7 +838,7 @@ def parse_maven_chain(confs, scratch=False):
|
|||
return builds
|
||||
|
||||
|
||||
def to_list(l):
|
||||
def to_list(lst):
|
||||
"""
|
||||
Helper function for py2/py3 compatibility used e.g. in
|
||||
list(dict.keys())
|
||||
|
|
@ -847,7 +847,7 @@ def to_list(l):
|
|||
used, so it is always an iterator.
|
||||
"""
|
||||
|
||||
if isinstance(l, list):
|
||||
return l
|
||||
if isinstance(lst, list):
|
||||
return lst
|
||||
else:
|
||||
return list(l)
|
||||
return list(lst)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ from koji.context import context
|
|||
from koji.plugin import export
|
||||
# XXX - have to import kojihub for make_task
|
||||
sys.path.insert(0, '/usr/share/koji-hub/')
|
||||
import kojihub # noqa: F402
|
||||
import kojihub # noqa: E402
|
||||
|
||||
__all__ = ('runroot',)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import koji
|
|||
from koji.context import context
|
||||
from koji.plugin import export
|
||||
sys.path.insert(0, '/usr/share/koji-hub/')
|
||||
import kojihub # noqa: F402
|
||||
import kojihub # noqa: E402
|
||||
|
||||
__all__ = ('saveFailedTree',)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import koji.policy
|
|||
from koji.context import context
|
||||
from koji.plugin import callback, export
|
||||
sys.path.insert(0, "/usr/share/koji-hub/")
|
||||
from kojihub import ( # noqa: F402
|
||||
from kojihub import ( # noqa: E402
|
||||
QueryProcessor,
|
||||
_create_build_target,
|
||||
_create_tag,
|
||||
|
|
|
|||
|
|
@ -336,8 +336,8 @@ class WindowsBuild(object):
|
|||
checksum = hashlib.md5()
|
||||
else:
|
||||
raise BuildError('Unknown checksum type %s for %s' % ( # noqa: F821
|
||||
checksum_type,
|
||||
os.path.basename(fileinfo['localpath'])))
|
||||
checksum_type,
|
||||
os.path.basename(fileinfo['localpath'])))
|
||||
with open(destpath, 'w') as destfile:
|
||||
offset = 0
|
||||
while True:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue