aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Orling <timothy.t.orling@linux.intel.com>2017-11-28 06:35:31 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-20 22:31:10 +0000
commite4cc287e41af2e52240a20d4bf2b6cc0f1f85314 (patch)
tree040c45213e4ebbfa9eaf43fbc95863a0141cecce
parent6959e2e4dba5bbfa6ffd49c44e738cc1c38bc280 (diff)
downloadopenembedded-core-contrib-e4cc287e41af2e52240a20d4bf2b6cc0f1f85314.tar.gz
python2 create_manifest.py: fix trailing whitespace in json
The json.dumps function adds trailing whitespace when using indent, because the default separator is not ','. The workaround [1] is to set the separators to be ',' and ': ', e.g. separators=(',', ': ') [1] https://hg.python.org/cpython/rev/78bad589f205 Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-devtools/python/python/create_manifest2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python/create_manifest2.py b/meta/recipes-devtools/python/python/create_manifest2.py
index bd64ec3ee7..e7450452ba 100644
--- a/meta/recipes-devtools/python/python/create_manifest2.py
+++ b/meta/recipes-devtools/python/python/create_manifest2.py
@@ -274,4 +274,4 @@ for key in new_manifest:
# Create the manifest from the data structure that was built
with open('python2-manifest.json.new','w') as outfile:
- json.dump(new_manifest,outfile,sort_keys=True, indent=4)
+ json.dump(new_manifest,outfile,sort_keys=True, indent=4, separators=(',', ': '))