[issue5258] addpackage in site.py fails hard on badly formed .pth files

2009-02-14 Thread James Wheare
James Wheare added the comment: To clarify, the exception doesn't interrupt the interpreter, but the only indication of a problem is the following message: 'import site' failed; use -v for traceback And you're then unable to import modules from site-packages. Also, her

[issue5258] addpackage in site.py fails hard on badly formed .pth files

2009-02-14 Thread James Wheare
New submission from James Wheare : As described here: http://james.wheare.org/notes/2009/02/import-site- failed-use-v-for-traceback.php The addpackage function will result in a TypeError being raised from os.path.exists(dir) -> from os.stat(path) if the contents of an inspected .pth f