now handles 'non file diffs'

this allows modules to pass back a 'diff' dict and it will still show using the file interface
pull/13736/head
Brian Coca 9 years ago
parent 22d4dc9d85
commit 9972c27a9b

@ -116,6 +116,10 @@ class CallbackBase:
if 'src_larger' in diff:
ret.append("diff skipped: source file size is greater than %d\n" % diff['src_larger'])
if 'before' in diff and 'after' in diff:
# format complex structures into 'files'
for x in ['before', 'after']:
if isinstance(diff[x], dict):
diff[x] = json.dumps(diff[x], sort_keys=True, indent=4)
if 'before_header' in diff:
before_header = "before: %s" % diff['before_header']
else:

Loading…
Cancel
Save