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

Unified Diff: build/win/clobber_generated_headers.py

Issue 159866: Re-enable the grit hook, and make it more solid in case of failures.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« DEPS ('K') | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/win/clobber_generated_headers.py
===================================================================
--- build/win/clobber_generated_headers.py (revision 22399)
+++ build/win/clobber_generated_headers.py (working copy)
@@ -12,6 +12,7 @@
_SRC_PATH = os.path.join(os.path.dirname(__file__), '..', '..')
sys.path.append(os.path.join(_SRC_PATH, 'tools', 'grit'))
+import grit.exception
import grit.grd_reader
# We need to apply the workaround only on Windows.
@@ -31,7 +32,16 @@
for path in sys.argv[1:]:
path = os.path.join('src', path)
path_components = total_split(path)
- root = grit.grd_reader.Parse(path)
+ try:
+ root = grit.grd_reader.Parse(path)
+ except grit.exception.Base, exc:
+ # This hook exploded badly a few times on the buildbot with exception
+ # at this point. Do not exit with an error, just print more information
+ # for debugging.
+ # TODO(phajdan.jr): Make exception fatal when the root cause is fixed.
+ print 'Unexpected GRIT exception while processing ' + path
+ print exc
+ continue
output_files = [node.GetOutputFilename() for node in root.GetOutputFiles()]
output_headers = [file for file in output_files if file.endswith('.h')]
for build_type in ('Debug', 'Release'):
« DEPS ('K') | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698