I'd like to upload a fix for 651437 as a stable update: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651437 The diff (also in the bug) is: === modified file 'debpython/tools.py' --- debpython/tools.py 2010-12-24 00:06:55 +0000 +++ debpython/tools.py 2011-01-14 21:54:02 +0000 @@ -97,9 +97,12 @@ :returns: pair of Python interpreter string and Python version """ try: - with open(fname) as fp: + with open(fname, 'rb') as fp: data = fp.read(32) - match = SHEBANG_RE.match(data) + if b"\0" in data: + # binary file + return None + match = SHEBANG_RE.match(str(data, 'utf-8')) if not match: return None res = match.groups() Is this OK? Please CC me on any replies as I am not subscribed. Scott K
Attachment:
signature.asc
Description: This is a digitally signed message part.