Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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, "")
else:
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])
else:
# 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))
continue
(job_id, status, ops, opresult, opstatus, oplog,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment