From e4cc287e41af2e52240a20d4bf2b6cc0f1f85314 Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Tue, 28 Nov 2017 06:35:31 -0800 Subject: [PATCH] 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 Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python/create_manifest2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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=(',', ': ')) -- 2.40.1