From 850ba43f632da5abdcec66a987586b8a01980f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Tue, 12 May 2009 07:04:51 +0000 Subject: [PATCH] Merged revisions 72577 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72577 | tarek.ziade | 2009-05-12 09:01:29 +0200 (Tue, 12 May 2009) | 1 line removing the assert statement so the code works when Python is run with -O ........ --- Lib/distutils/command/install_lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py index 81107a85cb5..4ea61d78dc5 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"