]> granicus.if.org Git - python/commitdiff
Merged revisions 72577 via svnmerge from
authorTarek Ziadé <ziade.tarek@gmail.com>
Tue, 12 May 2009 07:06:42 +0000 (07:06 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Tue, 12 May 2009 07:06:42 +0000 (07:06 +0000)
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
........

Lib/distutils/command/install_lib.py

index 022efa48fce2b55b97a98c81fa2ae9910b5a9010..85fb3acd4e9add2304961588dbd6124fd43404db 100644 (file)
@@ -77,7 +77,8 @@ class install_lib(Command):
         if not isinstance(self.optimize, int):
             try:
                 self.optimize = int(self.optimize)
-                assert self.optimize in (0, 1, 2)
+                if self.optimize not in (0, 1, 2):
+                    raise AssertionError
             except (ValueError, AssertionError):
                 raise DistutilsOptionError("optimize must be 0, 1, or 2")