Fix whitespace that occurs after comma

Use a custom tuple of separators for json.dumps that avoids
having the comma+space, which looks bad if this is ever committed.
Replace it by just having ": " and "," (no space after) instead.

An example of this so that it can be more clear:

http://paste.openstack.org/show/84238/

Note the above paste where the old version has spaces after
commas where as the newer version does not have these spaces.

Change-Id: Ifd04d5e1b26ebdf9db374761f31baaf1e33d87cd
This commit is contained in:
Joshua Harlow 2014-04-25 14:15:38 -07:00 committed by Joshua Harlow
parent b706c1e5d1
commit 0326f6781f

View File

@ -97,7 +97,8 @@ def main():
} }
filename, _ext = os.path.splitext(filename) filename, _ext = os.path.splitext(filename)
with open("%s.json" % (filename), "wb") as fh: with open("%s.json" % (filename), "wb") as fh:
fh.write(json.dumps(details, sort_keys=True, indent=4)) fh.write(json.dumps(details, sort_keys=True, indent=4,
separators=(",", ": ")))
if __name__ == '__main__': if __name__ == '__main__':