flake8: apply E1 rules
This commit is contained in:
parent
450f9249cd
commit
ce1f9928af
30 changed files with 958 additions and 958 deletions
|
|
@ -66,8 +66,8 @@ def expand_rpm(filepath, tmpdir):
|
|||
close_fds=True)
|
||||
if rpm2cpio.wait() != 0 or cpio.wait() != 0:
|
||||
raise koji.CallbackError('error extracting files from %s, ' \
|
||||
'rpm2cpio returned %s, cpio returned %s' % \
|
||||
(filepath, rpm2cpio.wait(), cpio.wait()))
|
||||
'rpm2cpio returned %s, cpio returned %s' % \
|
||||
(filepath, rpm2cpio.wait(), cpio.wait()))
|
||||
devnull.close()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ def runroot(tagInfo, arch, command, channel=None, **opts):
|
|||
choices = [x for x in tagarches if x in chanarches]
|
||||
if not choices:
|
||||
raise koji.GenericError('no common arches for tag/channel: %s/%s' \
|
||||
% (tagInfo, taskopts['channel']))
|
||||
% (tagInfo, taskopts['channel']))
|
||||
taskopts['arch'] = koji.canonArch(random.choice(choices))
|
||||
|
||||
args = koji.encode_args(tagInfo, arch, command, **opts)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ def saveFailedTree(buildrootID, full=False, **opts):
|
|||
raise koji.PreBuildError("Task %s has not failed. Only failed tasks can upload their buildroots." % taskID)
|
||||
elif allowed_methods != '*' and task_info['method'] not in allowed_methods:
|
||||
raise koji.PreBuildError("Only %s tasks can upload their buildroots (Task %s is %s)." % \
|
||||
(', '.join(allowed_methods), task_info['id'], task_info['method']))
|
||||
(', '.join(allowed_methods), task_info['id'], task_info['method']))
|
||||
elif task_info["owner"] != context.session.user_id and not context.session.hasPerm('admin'):
|
||||
raise koji.ActionNotAllowed("Only owner of failed task or 'admin' can run this task.")
|
||||
elif not kojihub.get_host(task_info['host_id'])['enabled']:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue