You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2009-09-25.20:58:20.709>created_at=<Date2009-09-25.20:07:57.117>labels= ['type-bug']
title='TypeError in pathfix.py'updated_at=<Date2009-09-25.20:58:20.699>user='https://bugs.python.org/amcnabb'
Traceback (most recent call last):
File "Tools/scripts/pathfix.py", line 149, in <module>
main()
File "Tools/scripts/pathfix.py", line 54, in mainif recursedown(arg): bad =1
File "Tools/scripts/pathfix.py", line 82, in recursedownelif ispython(name):
File "Tools/scripts/pathfix.py", line 64, in ispythonreturn ispythonprog.match(name) >=0TypeError: unorderable types: NoneType() >= int()
It looks like an easy fix would be to change line 64 from:
return ispythonprog.match(name) >= 0
to:
returnbool(ispythonprog.match(name))
After making this change, I got another crash, this time due to a
UnicodeDecodeError. Apparently, the file
(Demo/distutils/test2to3/setup.py) has a character encoded in ISO-8859.
Since pathfix.py is only concerned with ASCII text in the first line of
a file, it seems that it should probably operate on bytes instead of
unicode strings.
By the way, it's a little odd (but not technically invalid) that the
format string on line 146 is: '#! %s\n'. I would normally expect to see
no whitespace: '#!%s\n'.
Anyway, I'm attaching a patch that fixes addresses all of the above
issues and which seems to make pathfix.py work for all files in the
Python 3.1.1 source tree.
amcnabbmannequin
added
type-crash
A hard crash of the interpreter, possibly with a core dump
type-bug
An unexpected behavior, bug, or error
and removed
type-crash
A hard crash of the interpreter, possibly with a core dump
labels
Sep 25, 2009
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: