From: stevenknight Date: Tue, 2 Oct 2001 12:24:13 +0000 (+0000) Subject: Fix various bugs caused by Python 2.1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e874aa625cd7f00bfde7572e077a6f785f8e16be;p=scons.git Fix various bugs caused by Python 2.1 git-svn-id: http://scons.tigris.org/svn/scons/trunk@79 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py index de157123..03afc272 100644 --- a/src/engine/SCons/Node/__init__.py +++ b/src/engine/SCons/Node/__init__.py @@ -49,8 +49,12 @@ class Node: def add_dependency(self, depend): """Adds dependencies. The depends argument must be a list.""" + if type(depend) is not type([]): + raise TypeError("depend must be a list") self.depends.extend(depend) def add_source(self, source): """Adds sources. The source argument must be a list.""" + if type(source) is not type([]): + raise TypeError("source must be a list") self.sources.extend(source) diff --git a/src/script/scons.py b/src/script/scons.py index e0e958b7..d3a1ee8d 100644 --- a/src/script/scons.py +++ b/src/script/scons.py @@ -519,7 +519,7 @@ def main(): # It's all right if there's no SCONSFLAGS environment variable. pass except getopt_err, x: - _scons_user_warning("SCONSFLAGS " + x) + _scons_user_warning("SCONSFLAGS " + str(x)) else: for opt, arg in cmd_opts: opt_func[opt](opt, arg)