is_python should catch TypeError
I just got an error trying to upgrade SilverCity from easy_install: File "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/easy_install.py", line 1462, in is_python compile(text, filename, 'exec') TypeError: compile() expected string without null bytes You can reproduce it easily:
from setuptools.command.easy_install import is_python is_python('\0')
The fix is simply to add TypeError to the except clause along with SyntaxError. -- Matt Good
At 12:00 PM 2/17/2007 -0500, Matt Good wrote:
I just got an error trying to upgrade SilverCity from easy_install:
File "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/easy_install.py", line 1462, in is_python compile(text, filename, 'exec') TypeError: compile() expected string without null bytes
You can reproduce it easily:
from setuptools.command.easy_install import is_python is_python('\0')
The fix is simply to add TypeError to the except clause along with SyntaxError.
Added for 0.6c6. Thanks!
participants (2)
-
Matt Good
-
Phillip J. Eby