diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-07-22 09:03:01 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-07-22 09:03:01 (GMT) |
commit | 3cc12f69421f14c4d919cc015b71259056b3bc60 (patch) | |
tree | 2eb53a5a52fdda12d27ebdaa69ac25e9e80cc568 /Lib/distutils | |
parent | ba426148bf92b4fd949518800fb4b0e9c0ce2f94 (diff) | |
download | cpython-3cc12f69421f14c4d919cc015b71259056b3bc60.zip cpython-3cc12f69421f14c4d919cc015b71259056b3bc60.tar.gz cpython-3cc12f69421f14c4d919cc015b71259056b3bc60.tar.bz2 |
Merged revisions 74164 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r74164 | tarek.ziade | 2009-07-22 10:57:28 +0200 (Wed, 22 Jul 2009) | 9 lines
Merged revisions 74163 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74163 | tarek.ziade | 2009-07-22 10:55:19 +0200 (Wed, 22 Jul 2009) | 1 line
Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O
........
................
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/extension.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/distutils/extension.py b/Lib/distutils/extension.py index 16d2bef..5c07bda 100644 --- a/Lib/distutils/extension.py +++ b/Lib/distutils/extension.py @@ -103,10 +103,11 @@ class Extension: optional=None, **kw # To catch unknown keywords ): - assert isinstance(name, str), "'name' must be a string" - assert (isinstance(sources, list) and - all(isinstance(v, str) for v in sources)), \ - "'sources' must be a list of strings" + if not isinstance(name, str): + raise AssertionError("'name' must be a string") + if not (isinstance(sources, list) and + all(isinstance(v, str) for v in sources)): + raise AssertionError("'sources' must be a list of strings") self.name = name self.sources = sources |