diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-05-12 07:01:29 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-05-12 07:01:29 (GMT) |
commit | 4ba25c25d29d68814f67ccc2e8e4fa4672d7f404 (patch) | |
tree | f7d578e8586dfb55f67f40468505a39b3a2dab6b /Lib/distutils/command/install_lib.py | |
parent | 71189549148922f8fa7ede38433615e0a94d0462 (diff) | |
download | cpython-4ba25c25d29d68814f67ccc2e8e4fa4672d7f404.zip cpython-4ba25c25d29d68814f67ccc2e8e4fa4672d7f404.tar.gz cpython-4ba25c25d29d68814f67ccc2e8e4fa4672d7f404.tar.bz2 |
removing the assert statement so the code works when Python is run with -O
Diffstat (limited to 'Lib/distutils/command/install_lib.py')
-rw-r--r-- | Lib/distutils/command/install_lib.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py index 87e3c7a..411db79 100644 --- a/Lib/distutils/command/install_lib.py +++ b/Lib/distutils/command/install_lib.py @@ -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" |