Commit b27b39b0 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix ‘gnt-job info’ with no arguments

I didn't realize that my zip will break when no args are passed...

Reviewed-by: imsnah
parent aad81f98
......@@ -149,14 +149,19 @@ def ShowJobs(opts, args):
first = True
for entry, arg_job in zip(result, args):
for idx, entry in enumerate(result):
if not first:
format(0, "")
first = False
if entry is None:
format(0, "Job ID %s not found" % arg_job)
if idx <= len(args):
format(0, "Job ID %s not found" % args[idx])
# this should not happen, when we don't pass args it will be a
# valid job returned
format(0, "Job ID requested as argument %s not found" % (idx + 1))
(job_id, status, ops, opresult, opstatus, oplog,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment