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

This commit is contained in:
Tarek Ziadé 2009-05-12 07:01:29 +00:00
parent 7118954914
commit 4ba25c25d2
1 changed files with 2 additions and 1 deletions

View 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"