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

2010-12-26 Thread R. David Murray
R. David Murray added the comment: Committed to py3k in r87497, 3.1 in r87499, and 2.7 in r87500. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

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

2010-12-26 Thread Georg Brandl
Georg Brandl added the comment: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

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

2010-12-26 Thread R. David Murray
R. David Murray added the comment: Here is a revised patch with tests. -- Added file: http://bugs.python.org/file20169/site_pth_exceptions.diff ___ Python tracker ___ ___

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

2010-12-25 Thread R. David Murray
R. David Murray added the comment: Yes, I forgot to delete that bit when I realized it could all be done in one place. -- ___ Python tracker ___

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

2010-12-25 Thread Georg Brandl
Georg Brandl added the comment: Your patch is indeed better than mine, but I think the try-except in addsitedir() is not needed anymore? -- ___ Python tracker ___ __

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

2010-12-24 Thread R. David Murray
Changes by R. David Murray : -- nosy: +Arfrever, dwr2, eric.araujo, haypo, tarek ___ Python tracker ___ ___ Python-bugs-list mailing li

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

2010-12-24 Thread R. David Murray
R. David Murray added the comment: Yes, I think it is a good idea for site.py to issue error messages and continue on when it is processing files that don't come from the python distribution itself (such as pth files). However, I think just printing the error message is not going to provide

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

2010-08-01 Thread Georg Brandl
Georg Brandl added the comment: Adding a patch that catches exceptions in a single addpackage() call and prints them. I'd like to have more input though if this is a Good Thing(tm). -- assignee: -> r.david.murray keywords: +patch nosy: +georg.brandl, r.david.murray Added file: http:/

[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, here's a clickable link to

[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 file conta