flake8: apply E1 rules

This commit is contained in:
Yuming Zhu 2020-02-26 02:08:41 +08:00
parent 450f9249cd
commit ce1f9928af
30 changed files with 958 additions and 958 deletions

View file

@ -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()

View file

@ -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)

View file

@ -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']: