diff options
author | Anthony King <anthonydking@slimroms.net> | 2015-10-31 15:27:39 -0400 |
---|---|---|
committer | Tom Powell <zifnab@zifnab06.net> | 2016-01-04 10:54:54 -0800 |
commit | 12b55e8654520aac7cb466e7c149a11a48cc3b0e (patch) | |
tree | caaca3a888ee7be31b9ff0723c1aa11eb3cd37dd | |
parent | b1579843dd49ec2ee50e799754f69b2a6f1aab59 (diff) | |
download | build-12b55e8654520aac7cb466e7c149a11a48cc3b0e.zip build-12b55e8654520aac7cb466e7c149a11a48cc3b0e.tar.gz build-12b55e8654520aac7cb466e7c149a11a48cc3b0e.tar.bz2 |
py3: post_process_props
Change-Id: Idf7ed5daa4eaa88f5421c798862ea6bb09593cdc
-rwxr-xr-x | tools/post_process_props.py | 9 |
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 |