mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
removing the assert statement so the code works when Python is run with -O
This commit is contained in:
parent
7118954914
commit
4ba25c25d2
1 changed files with 2 additions and 1 deletions
|
@ -80,7 +80,8 @@ class install_lib(Command):
|
||||||
if not isinstance(self.optimize, int):
|
if not isinstance(self.optimize, int):
|
||||||
try:
|
try:
|
||||||
self.optimize = int(self.optimize)
|
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):
|
except (ValueError, AssertionError):
|
||||||
raise DistutilsOptionError, "optimize must be 0, 1, or 2"
|
raise DistutilsOptionError, "optimize must be 0, 1, or 2"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue