Commit d1b47b16 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Fix output for “gnt-job info”



If the result of an opcode was a non-empty dictionary, it
would be impossible to differenciate between input and result:

  Input fields:
    […]
    debug_level: 0
    fields: cluster_name,master_node,volume_group_name
    jobs: [[True, u'37922'], [True, u'37923'], [True, u'37924']]

Expected output:

  Input fields:
    […]
    debug_level: 0
    fields: cluster_name,master_node,volume_group_name
  Result:
    jobs: [[True, u'37922'], [True, u'37923'], [True, u'37924']]
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent f0a80b01
......@@ -317,6 +317,7 @@ def ShowJobs(opts, args):
if not result:
format_msg(3, "Result: empty dictionary")
else:
format_msg(3, "Result:")
for key, val in result.iteritems():
format_msg(4, "%s: %s" % (key, result_helper(val)))
else:
......
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