summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAnthony King <anthonydking@slimroms.net>2015-10-31 15:27:39 -0400
committerTom Powell <zifnab@zifnab06.net>2016-01-04 10:54:54 -0800
commit12b55e8654520aac7cb466e7c149a11a48cc3b0e (patch)
treecaaca3a888ee7be31b9ff0723c1aa11eb3cd37dd /tools
parentb1579843dd49ec2ee50e799754f69b2a6f1aab59 (diff)
downloadbuild-12b55e8654520aac7cb466e7c149a11a48cc3b0e.zip
build-12b55e8654520aac7cb466e7c149a11a48cc3b0e.tar.gz
build-12b55e8654520aac7cb466e7c149a11a48cc3b0e.tar.bz2
py3: post_process_props
Change-Id: Idf7ed5daa4eaa88f5421c798862ea6bb09593cdc
Diffstat (limited to 'tools')
-rwxr-xr-xtools/post_process_props.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/post_process_props.py b/tools/post_process_props.py
index 5193d4b..6bb68c7 100755
--- a/tools/post_process_props.py
+++ b/tools/post_process_props.py
@@ -16,6 +16,13 @@
import os, sys
+
+def iteritems(obj):
+ if hasattr(obj, 'iteritems'):
+ return obj.iteritems()
+ return obj.items()
+
+
# Usage: post_process_props.py file.prop [blacklist_key, ...]
# Blacklisted keys are removed from the property file, if present
@@ -63,7 +70,7 @@ def validate(prop):
"""
check_pass = True
buildprops = prop.to_dict()
- for key, value in buildprops.iteritems():
+ for key, value in iteritems(buildprops):
# Check build properties' length.
if len(key) > PROP_NAME_MAX:
check_pass = False