[Python-checkins] r72577 - python/trunk/Lib/distutils/command/install_lib.py

tarek.ziade python-checkins at python.org
Tue May 12 09:01:30 CEST 2009


Author: tarek.ziade
Date: Tue May 12 09:01:29 2009
New Revision: 72577

Log:
removing the assert statement so the code works when Python is run with -O

Modified:
   python/trunk/Lib/distutils/command/install_lib.py

Modified: python/trunk/Lib/distutils/command/install_lib.py
==============================================================================
--- python/trunk/Lib/distutils/command/install_lib.py	(original)
+++ python/trunk/Lib/distutils/command/install_lib.py	Tue May 12 09:01:29 2009
@@ -80,7 +80,8 @@
         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"
 


More information about the Python-checkins mailing list