fix python 2.4 incompatibilities in download-task and runroot commands
This commit is contained in:
parent
28a1f1e039
commit
870638b152
1 changed files with 4 additions and 3 deletions
7
cli/koji
7
cli/koji
|
|
@ -6366,8 +6366,9 @@ def anon_handle_download_task(options, sessions, args):
|
|||
for (task, filename, new_filename) in downloads:
|
||||
number += 1
|
||||
print _("Downloading [%d/%d]: %s") % (number, len(downloads), new_filename)
|
||||
with open(new_filename, "wb") as output_file:
|
||||
output_file.write(session.downloadTaskOutput(task["id"], filename))
|
||||
output_file = open(new_filename, "wb")
|
||||
output_file.write(session.downloadTaskOutput(task["id"], filename))
|
||||
output_file.close()
|
||||
|
||||
def anon_handle_wait_repo(options, session, args):
|
||||
"Wait for a repo to be regenerated"
|
||||
|
|
@ -6587,7 +6588,7 @@ def handle_runroot(options, session, args):
|
|||
repo_id=opts.repo_id,
|
||||
skip_setarch=opts.skip_setarch,
|
||||
weight=opts.weight)
|
||||
except koji.GenericError as e:
|
||||
except koji.GenericError, e:
|
||||
if 'Invalid method' in str(e):
|
||||
print "* The runroot plugin appears to not be installed on the",
|
||||
print "koji hub. Please contact the administrator."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue