Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1674050b authored by Anthony King's avatar Anthony King Committed by Steve Kondik
Browse files

py3: post_process_props

Change-Id: Idf7ed5daa4eaa88f5421c798862ea6bb09593cdc
parent 424e41b4
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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

@@ -64,7 +71,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