summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/install_lib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/command/install_lib.py')
-rw-r--r--Lib/distutils/command/install_lib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py
index 81107a8..4ea61d7 100644
--- a/Lib/distutils/command/install_lib.py
+++ b/Lib/distutils/command/install_lib.py
@@ -80,7 +80,8 @@ class install_lib (Command):
if type(self.optimize) is not IntType:
try:
self.optimize = int(self.optimize)
- assert 0 <= self.optimize <= 2
+ if self.optimize not in (0, 1, 2):
+ raise AssertionError
except (ValueError, AssertionError):
raise DistutilsOptionError, "optimize must be 0, 1, or 2"