From 716ffd0c28ff2faf13ff36076e01e9fbc235e833 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Mon, 27 Jun 2016 13:22:53 -0700 Subject: [PATCH] Avoid integer to None comparison for Python 3. Bug: https://github.com/android-ndk/ndk/issues/134 Change-Id: I6708e0c2cb8df21ad820d098619b93306adf1c42 --- build/tools/make_standalone_toolchain.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/tools/make_standalone_toolchain.py b/build/tools/make_standalone_toolchain.py index 2c71f4cb..c63936b1 100755 --- a/build/tools/make_standalone_toolchain.py +++ b/build/tools/make_standalone_toolchain.py @@ -522,7 +522,11 @@ def main(): """Program entry point.""" args = parse_args() - if args.verbose == 1: + if args.verbose is None: + # Integer comparisons against None are not supported in python3. Short + # circuit the checks below here. + pass + elif args.verbose == 1: logging.basicConfig(level=logging.INFO) elif args.verbose >= 2: logging.basicConfig(level=logging.DEBUG)