From dc6654af6117d7fef4309b9cf6fb4e66486bc1a7 Mon Sep 17 00:00:00 2001 From: Luca Stefani Date: Sun, 9 Feb 2020 13:32:31 +0100 Subject: Add support for python3 Change-Id: I383105408eb4da24f3e0e5a8cd1fa4f2a15f3b7d --- checkcolor.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/checkcolor.py b/checkcolor.py index 204c7e5..c64495e 100755 --- a/checkcolor.py +++ b/checkcolor.py @@ -18,6 +18,8 @@ """Script used by developers to run hardcoded color check.""" +from __future__ import print_function + import argparse import errno import os @@ -71,10 +73,10 @@ def RunCheckOnProject(root): exitcode = check.returncode except OSError as e: if e.errno == errno.ENOENT: - print 'Error in color lint check' + print('Error in color lint check') if not os.environ.get('ANDROID_BUILD_TOP'): - print 'Try setting up your environment first:' - print ' source build/envsetup.sh && lunch ' + print('Try setting up your environment first:') + print(' source build/envsetup.sh && lunch ') sys.exit(1) return (exitcode, stdout) @@ -91,10 +93,10 @@ def main(): code, message = RunCheckOnProject(rootdir) if code != 0: exitcode = 1 - print message + print(message) if exitcode == 1: - print 'Please check link for more info:', COLOR_CHECK_README_PATH + print('Please check link for more info:', COLOR_CHECK_README_PATH) sys.exit(exitcode) -- cgit v1.2.3