Commits

Anonymous committed 30fe17e

Fix various bugs caused by Python 2.1

  • Participants
  • Parent commits 596a072

Comments (0)

Files changed (2)

src/engine/SCons/Node/__init__.py

 
     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)

src/script/scons.py

 	# 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)