]> granicus.if.org Git - python/commitdiff
removing the assert statement so the code works when Python is run with -O
authorTarek Ziadé <ziade.tarek@gmail.com>
Tue, 12 May 2009 07:01:29 +0000 (07:01 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Tue, 12 May 2009 07:01:29 +0000 (07:01 +0000)
Lib/distutils/command/install_lib.py

index 87e3c7aa04a0ea059fea1f9c763db4dfa2cf9cc5..411db79cc2482103a5cea8708841a55d6a7244db 100644 (file)
@@ -80,7 +80,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"