Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: build/android/gyp/generate_v14_compatible_resources.py

Issue 1315743004: [Android] Add a custom pylintrc for build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix appurify_sanitized import-errors Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/android/findbugs_diff.py ('k') | build/android/gyp/lint.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Convert Android xml resources to API 14 compatible. 7 """Convert Android xml resources to API 14 compatible.
8 8
9 There are two reasons that we cannot just use API 17 attributes, 9 There are two reasons that we cannot just use API 17 attributes,
10 so we are generating another set of resources by this script. 10 so we are generating another set of resources by this script.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 if node.nodeType == node.ELEMENT_NODE: 62 if node.nodeType == node.ELEMENT_NODE:
63 yield node 63 yield node
64 for child_node in node.childNodes: 64 for child_node in node.childNodes:
65 for child_node_element in IterateXmlElements(child_node): 65 for child_node_element in IterateXmlElements(child_node):
66 yield child_node_element 66 yield child_node_element
67 67
68 68
69 def ParseAndReportErrors(filename): 69 def ParseAndReportErrors(filename):
70 try: 70 try:
71 return minidom.parse(filename) 71 return minidom.parse(filename)
72 except Exception: 72 except Exception: # pylint: disable=broad-except
73 import traceback 73 import traceback
74 traceback.print_exc() 74 traceback.print_exc()
75 sys.stderr.write('Failed to parse XML file: %s\n' % filename) 75 sys.stderr.write('Failed to parse XML file: %s\n' % filename)
76 sys.exit(1) 76 sys.exit(1)
77 77
78 78
79 def AssertNotDeprecatedAttribute(name, value, filename): 79 def AssertNotDeprecatedAttribute(name, value, filename):
80 """Raises an exception if the given attribute is deprecated.""" 80 """Raises an exception if the given attribute is deprecated."""
81 msg = None 81 msg = None
82 if name in ATTRIBUTES_TO_MAP_REVERSED: 82 if name in ATTRIBUTES_TO_MAP_REVERSED:
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 build_utils.MakeDirectory(res_v14_dir) 315 build_utils.MakeDirectory(res_v14_dir)
316 316
317 GenerateV14Resources(options.res_dir, res_v14_dir) 317 GenerateV14Resources(options.res_dir, res_v14_dir)
318 318
319 if options.stamp: 319 if options.stamp:
320 build_utils.Touch(options.stamp) 320 build_utils.Touch(options.stamp)
321 321
322 if __name__ == '__main__': 322 if __name__ == '__main__':
323 sys.exit(main()) 323 sys.exit(main())
324 324
OLDNEW
« no previous file with comments | « build/android/findbugs_diff.py ('k') | build/android/gyp/lint.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698