Fix outputter detection in jobs.lookup_jid runner

The outputter detection was always failing because `data` is the return
from the `jobs.list_job` runner, which has an extra dictionary level at
the top.
This commit is contained in:
Erik Johnson 2018-07-03 14:24:52 -05:00
parent 422441505d
commit 6509aa9089
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

View file

@ -150,7 +150,7 @@ def lookup_jid(jid,
try:
# Check if the return data has an 'out' key. We'll use that as the
# outputter in the absence of one being passed on the CLI.
outputter = data[next(iter(data))].get('out')
outputter = returns[next(iter(returns))].get('out')
except (StopIteration, AttributeError):
outputter = None