summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Script/SConscript.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Script/SConscript.py')
-rw-r--r--src/engine/SCons/Script/SConscript.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py
index 4e433829..7640ec85 100644
--- a/src/engine/SCons/Script/SConscript.py
+++ b/src/engine/SCons/Script/SConscript.py
@@ -115,7 +115,7 @@ def compute_exports(exports):
except KeyError:
retval[export] = glob[export]
except KeyError, x:
- raise SCons.Errors.UserError, "Export of non-existent variable '%s'"%x
+ raise SCons.Errors.UserError("Export of non-existent variable '%s'"%x)
return retval
@@ -147,7 +147,7 @@ def Return(*vars, **kw):
for v in var.split():
retval.append(call_stack[-1].globals[v])
except KeyError, x:
- raise SCons.Errors.UserError, "Return of non-existent variable '%s'"%x
+ raise SCons.Errors.UserError("Return of non-existent variable '%s'"%x)
if len(retval) == 1:
call_stack[-1].retval = retval[0]
@@ -337,7 +337,7 @@ def annotate(node):
tb = tb.tb_next
if not tb:
# We did not find any exec of an SConscript file: what?!
- raise SCons.Errors.InternalError, "could not find SConscript stack frame"
+ raise SCons.Errors.InternalError("could not find SConscript stack frame")
node.creator = traceback.extract_stack(tb)[0]
# The following line would cause each Node to be annotated using the
@@ -390,8 +390,7 @@ class SConsEnvironment(SCons.Environment.Base):
try:
dirs = kw["dirs"]
except KeyError:
- raise SCons.Errors.UserError, \
- "Invalid SConscript usage - no parameters"
+ raise SCons.Errors.UserError("Invalid SConscript usage - no parameters")
if not SCons.Util.is_List(dirs):
dirs = [ dirs ]
@@ -412,8 +411,7 @@ class SConsEnvironment(SCons.Environment.Base):
else:
- raise SCons.Errors.UserError, \
- "Invalid SConscript() usage - too many arguments"
+ raise SCons.Errors.UserError("Invalid SConscript() usage - too many arguments")
if not SCons.Util.is_List(files):
files = [ files ]
@@ -424,8 +422,7 @@ class SConsEnvironment(SCons.Environment.Base):
variant_dir = kw.get('variant_dir') or kw.get('build_dir')
if variant_dir:
if len(files) != 1:
- raise SCons.Errors.UserError, \
- "Invalid SConscript() usage - can only specify one SConscript with a variant_dir"
+ raise SCons.Errors.UserError("Invalid SConscript() usage - can only specify one SConscript with a variant_dir")
duplicate = kw.get('duplicate', 1)
src_dir = kw.get('src_dir')
if not src_dir:
@@ -456,7 +453,7 @@ class SConsEnvironment(SCons.Environment.Base):
def Configure(self, *args, **kw):
if not SCons.Script.sconscript_reading:
- raise SCons.Errors.UserError, "Calling Configure from Builders is not supported."
+ raise SCons.Errors.UserError("Calling Configure from Builders is not supported.")
kw['_depth'] = kw.get('_depth', 0) + 1
return SCons.Environment.Base.Configure(self, *args, **kw)
@@ -524,7 +521,7 @@ class SConsEnvironment(SCons.Environment.Base):
else:
globals[v] = global_exports[v]
except KeyError,x:
- raise SCons.Errors.UserError, "Import of non-existent variable '%s'"%x
+ raise SCons.Errors.UserError("Import of non-existent variable '%s'"%x)
def SConscript(self, *ls, **kw):
def subst_element(x, subst=self.subst):
@@ -566,7 +563,7 @@ SCons.Environment.Environment = SConsEnvironment
def Configure(*args, **kw):
if not SCons.Script.sconscript_reading:
- raise SCons.Errors.UserError, "Calling Configure from Builders is not supported."
+ raise SCons.Errors.UserError("Calling Configure from Builders is not supported.")
kw['_depth'] = 1
return SCons.SConf.SConf(*args, **kw)