Merge "enable output of metadata to a file"
This commit is contained in:
commit
3497834323
@ -115,9 +115,12 @@ def run_job(conf, storage):
|
||||
'exec': job.ExecJob}[conf.action](conf, storage)
|
||||
response = freezer_job.execute()
|
||||
|
||||
if conf.metadata_out == '-':
|
||||
if response:
|
||||
if conf.metadata_out and response:
|
||||
if conf.metadata_out == '-':
|
||||
sys.stdout.write(json.dumps(response))
|
||||
else:
|
||||
with open(conf.metadata_out, 'w') as outfile:
|
||||
outfile.write(json.dumps(response))
|
||||
|
||||
|
||||
def fail(exit_code, e, quiet, do_log=True):
|
||||
|
Loading…
x
Reference in New Issue
Block a user