Message91222
The functions urlparse.url{,un}split() and urllib{,2}.open() do not work
together for relative, local files, due a bug in urlunsplit.
Given a file f='./rel/path/to/file.html' it can be open directly by
urllib.open(f), but not in urllib2! as the later needs a scheme.
We can create a sound url with spilt/unspilt and a default scheme:
f2=urlparse.urlunsplit(urlparse.urlsplit(f,'file')); which works most
cases, HOWEVER a bogus netloc is added for relative filepaths.
If have isolated this "buggy" function, added some local testcode and
made patch/workaround in my file 'unsplit.py' Which is included. Hope
this will contribute to a real patch.
--Groetjes, Albert
ALbert Mietus
Don't send spam mail!
Mijn missie: http://SoftwareBeterMaken.nl product, proces & imago.
Mijn leven in het kort:
http://albert.mietus.nl/Doc/CV_ALbert.html |
|
Date |
User |
Action |
Args |
2009-08-03 13:33:03 | albert | set | recipients:
+ albert |
2009-08-03 13:33:03 | albert | set | messageid: <1249306383.87.0.829314243328.issue6631@psf.upfronthosting.co.za> |
2009-08-03 13:33:02 | albert | link | issue6631 messages |
2009-08-03 13:33:02 | albert | create | |
|