[Python-checkins] r53813 - sandbox/trunk/setuptools/setuptools/command/easy_install.py

phillip.eby python-checkins at python.org
Sat Feb 17 18:53:46 CET 2007


Author: phillip.eby
Date: Sat Feb 17 18:53:45 2007
New Revision: 53813

Modified:
   sandbox/trunk/setuptools/setuptools/command/easy_install.py
Log:
Fix error if script contains null byte.


Modified: sandbox/trunk/setuptools/setuptools/command/easy_install.py
==============================================================================
--- sandbox/trunk/setuptools/setuptools/command/easy_install.py	(original)
+++ sandbox/trunk/setuptools/setuptools/command/easy_install.py	Sat Feb 17 18:53:45 2007
@@ -1460,7 +1460,7 @@
     "Is this string a valid Python script?"
     try:
         compile(text, filename, 'exec')
-    except SyntaxError:
+    except (SyntaxError, TypeError):
         return False
     else:
         return True


More information about the Python-checkins mailing list