[oe-commits] [openembedded-core] 09/21: python2 create_manifest.py: fix trailing whitespace in json

git at git.openembedded.org git at git.openembedded.org
Sun Dec 10 22:51:57 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 4df3f9daa4263f88a0a5beac09cae69a391ba630
Author: Tim Orling <timothy.t.orling at linux.intel.com>
AuthorDate: Tue Nov 28 06:35:31 2017 -0800

    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 at linux.intel.com>
---
 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 bd64ec3..e745045 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=(',', ': '))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list