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

Unified Diff: site_scons/site_tools/defer.py

Issue 8117: Pulling in latest software construction toolkit. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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 | « site_scons/site_tools/concat_source.py ('k') | site_scons/site_tools/directx_9_0_c.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: site_scons/site_tools/defer.py
===================================================================
--- site_scons/site_tools/defer.py (revision 3849)
+++ site_scons/site_tools/defer.py (working copy)
@@ -34,8 +34,8 @@
import os
import sys
import types
+import SCons.Errors
-
__defer_groups = {}
@@ -73,11 +73,10 @@
del __defer_groups[name]
break
if not did_work:
- print 'Error in _ExecuteDefer: dependency cycle detected.'
+ errmsg = 'Error in _ExecuteDefer: dependency cycle detected.\n'
for name, group in __defer_groups.items():
- print ' %s after: %s' % (name, group.after)
- # TODO(rspangler): should throw exception?
- sys.exit(1)
+ errmsg += ' %s after: %s\n' % (name, group.after)
+ raise SCons.Errors.UserError(errmsg)
# Restore directory
os.chdir(oldcwd)
@@ -152,9 +151,7 @@
after.append(a.__name__)
elif a is not None:
# Deferring
- # TODO(rspangler): should throw an exception
- print ('Warning: Defer can only wait for functions or names; ignoring'
- 'after = ', a)
+ raise ValueError('Defer after=%r is not a function or name' % a)
# Find the deferred function
if name not in __defer_groups:
« no previous file with comments | « site_scons/site_tools/concat_source.py ('k') | site_scons/site_tools/directx_9_0_c.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698