From: Tarek Ziadé Date: Tue, 12 May 2009 07:08:44 +0000 (+0000) Subject: Merged revisions 72579 via svnmerge from X-Git-Tag: 3.0~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9066e8c6dbbba1a216dfe84ec7ead5c56e29b47;p=thirdparty%2FPython%2Fcpython.git Merged revisions 72579 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r72579 | tarek.ziade | 2009-05-12 09:06:42 +0200 (Tue, 12 May 2009) | 9 lines Merged revisions 72577 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72577 | tarek.ziade | 2009-05-12 09:01:29 +0200 (Tue, 12 May 2009) | 1 line removing the assert statement so the code works when Python is run with -O ........ ................ --- diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py index ac620fccb9a2..741b6f02926a 100644 --- a/Lib/distutils/command/install_lib.py +++ b/Lib/distutils/command/install_lib.py @@ -73,7 +73,8 @@ class install_lib(Command): if not isinstance(self.optimize, int): try: self.optimize = int(self.optimize) - assert 0 <= self.optimize <= 2 + if self.optimize not in (0, 1, 2): + raise AssertionError except (ValueError, AssertionError): raise DistutilsOptionError("optimize must be 0, 1, or 2")