From 2fd26408a3a261ceb6edde9eeda821677e2f9df4 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sat, 17 Feb 2007 17:55:43 +0000 Subject: Fix error if script contains null byte. (backport from trunk) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4053814 --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command/easy_install.py') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index c8e0938b..5b7d001d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1460,7 +1460,7 @@ def is_python(text, filename=''): "Is this string a valid Python script?" try: compile(text, filename, 'exec') - except SyntaxError: + except (SyntaxError, TypeError): return False else: return True -- cgit v1.2.1