diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-23 01:34:26 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-23 01:34:26 +0000 |
commit | 816ecff915fe705134b713df053da4e069cf1dad (patch) | |
tree | fb1a2c34cdb5fe4b2bf9cb05a08ad9d000b12ec7 /tools/resources | |
parent | 03960d5207d0b00cf23df1ca98d42ae124b6d900 (diff) | |
download | chromium_src-816ecff915fe705134b713df053da4e069cf1dad.zip chromium_src-816ecff915fe705134b713df053da4e069cf1dad.tar.gz chromium_src-816ecff915fe705134b713df053da4e069cf1dad.tar.bz2 |
Make find_used_resources.py output resource ids in numerical order.
NOTRY=true
Review URL: https://codereview.chromium.org/246533003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265472 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/resources')
-rwxr-xr-x | tools/resources/find_used_resources.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/resources/find_used_resources.py b/tools/resources/find_used_resources.py index adce50e..63bcaa0 100755 --- a/tools/resources/find_used_resources.py +++ b/tools/resources/find_used_resources.py @@ -9,7 +9,7 @@ import sys usage = """find_used_resources.py -Prints out (to sdout) the sorted list of resource ids that are part of unknown +Prints out (to stdout) the sorted list of resource ids that are part of unknown pragma warning in the given build log (via stdin). This script is used to find the resources that are actually compiled in Chrome @@ -32,11 +32,11 @@ def GetResourceIdsInPragmaWarnings(input): """ used_resources = set() unknown_pragma_warning_pattern = re.compile( - 'whitelisted_resource_(?P<resource_id>[0-9]*)') + 'whitelisted_resource_(?P<resource_id>[0-9]+)') for ln in input: match = unknown_pragma_warning_pattern.search(ln) if match: - resource_id = match.group('resource_id') + resource_id = int(match.group('resource_id')) used_resources.add(resource_id) return sorted(used_resources) @@ -46,8 +46,8 @@ def Main(): sys.exit(1) else: used_resources = GetResourceIdsInPragmaWarnings(sys.stdin) - for rid in used_resources: - sys.stdout.write(rid + '\n') + for resource_id in used_resources: + sys.stdout.write('%d\n' % resource_id) if __name__ == '__main__': Main() |