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

Unified Diff: build/win/clobber_generated_headers.py

Issue 164173: Cosmetic fixes to clobber_generated_headers.py:... (Closed) Base URL: svn://chrome-svn/chrome/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
« no previous file with comments | « no previous file | 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 22755)
+++ build/win/clobber_generated_headers.py (working copy)
@@ -53,9 +53,12 @@
'global_intermediate', path_components[1])
for header in output_headers:
- full_path = os.path.join(intermediate_path, header)
- try:
- os.remove(full_path)
- print 'Clobbered ' + full_path
- except OSError:
- print 'Could not remove ' + full_path + '. Continuing.'
+ full_path = os.path.normpath(os.path.join(intermediate_path, header))
+ if os.path.exists(full_path):
+ try:
+ os.remove(full_path)
+ except OSError, e:
+ fmt = 'Could not remove %s: %s. Continuing.\n'
+ sys.stderr.write(fmt % (full_path, e))
+ else:
+ print 'Clobbered ' + full_path
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698