Revision b27b39b0

b/scripts/gnt-job
149 149

  
150 150
  first = True
151 151

  
152
  for entry, arg_job in zip(result, args):
152
  for idx, entry in enumerate(result):
153 153
    if not first:
154 154
      format(0, "")
155 155
    else:
156 156
      first = False
157 157

  
158 158
    if entry is None:
159
      format(0, "Job ID %s not found" % arg_job)
159
      if idx <= len(args):
160
        format(0, "Job ID %s not found" % args[idx])
161
      else:
162
        # this should not happen, when we don't pass args it will be a
163
        # valid job returned
164
        format(0, "Job ID requested as argument %s not found" % (idx + 1))
160 165
      continue
161 166

  
162 167
    (job_id, status, ops, opresult, opstatus, oplog,

Also available in: Unified diff