summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2023-01-26 17:29:13 -0800
committer Cole Faust <colefaust@google.com> 2023-01-26 17:29:13 -0800
commite03153b2bd2b6d540210316804be00e8bec62eab (patch)
treed1bc41323338eb76b5e4632c529891fd6bc2c030
parent459dcab94e0c9415d1ba1d3e28c10c86cbd31606 (diff)
Convert auto_gen_test_config.py to python 3
This script is run by soong, but without specifying the python launcher, so it uses the default "python" in the path, which is python 2. Convert the script to use python 3. Bug: 203436762 Test: Building an internal product that uses this Change-Id: I4496c03b8669c54d080aa45c446dd1f27d91259e
-rwxr-xr-xtools/auto_gen_test_config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/auto_gen_test_config.py b/tools/auto_gen_test_config.py
index 943f23815b..ce6416000b 100755
--- a/tools/auto_gen_test_config.py
+++ b/tools/auto_gen_test_config.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2017 The Android Open Source Project
#
@@ -69,7 +69,7 @@ def main(argv):
module = os.path.splitext(os.path.basename(target_config))[0]
instrumentation = instrumentation_elements[0]
manifest = manifest_elements[0]
- if instrumentation.attributes.has_key(ATTRIBUTE_LABEL):
+ if ATTRIBUTE_LABEL in instrumentation.attributes:
label = instrumentation.attributes[ATTRIBUTE_LABEL].value
else:
label = module