X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2Fchromite%2Fscripts%2Fcbuildbot_view_config.py;h=49360f07864a2defde9cf306893e0f0fe9b892f8;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=ac155db748c3ddbcda5ac7c825775d7d4047ee53;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/chromite/scripts/cbuildbot_view_config.py b/src/third_party/chromite/scripts/cbuildbot_view_config.py index ac155db..49360f0 100644 --- a/src/third_party/chromite/scripts/cbuildbot_view_config.py +++ b/src/third_party/chromite/scripts/cbuildbot_view_config.py @@ -4,6 +4,8 @@ """Script for dumping and/or comparing build config contents.""" +from __future__ import print_function + import json import pprint @@ -46,7 +48,7 @@ def _DumpConfigJson(cfg): Args: cfg: A single build config. """ - print json.dumps(cfg, cls=_JSONEncoder) + print(json.dumps(cfg, cls=_JSONEncoder)) def _DumpConfigPrettyJson(cfg): @@ -55,8 +57,8 @@ def _DumpConfigPrettyJson(cfg): Args: cfg: A single build config. """ - print json.dumps(cfg, cls=_JSONEncoder, - sort_keys=True, indent=4, separators=(',', ': ')) + print(json.dumps(cfg, cls=_JSONEncoder, + sort_keys=True, indent=4, separators=(',', ': '))) def _DumpConfigPrettyPrint(cfg): @@ -82,20 +84,20 @@ def _CompareConfig(old_cfg, new_cfg): if obj1 == obj2: continue elif obj1 is None: - print '%s: added to config\n' % (key,) + print('%s: added to config\n' % (key,)) continue elif obj2 is None: - print '%s: removed from config\n' % (key,) + print('%s: removed from config\n' % (key,)) continue - print '%s:' % (key,) + print('%s:' % (key,)) for subkey in sorted(set(obj1.keys() + obj2.keys())): sobj1, sobj2 = obj1.get(subkey), obj2.get(subkey) if sobj1 != sobj2: - print ' %s: %r, %r' % (subkey, sobj1, sobj2) + print(' %s: %r, %r' % (subkey, sobj1, sobj2)) - print + print() def GetParser():