[issue6631] urlparse.urlunsplit() can't handle relative files (for urllib*.open()

2009-08-07 Thread albert Mietus
albert Mietus alb...@mietus.nl added the comment: There was a bug in the workaround: if not ( scheme == 'file' and not netloc and url[0] != '/'): -=--- The {{{and url[0] != '/'}}} was missing (above is corrected) The effect

[issue6631] urlparse.urlunsplit() can't handle relative files (for urllib*.open()

2009-08-03 Thread albert Mietus
New submission from albert Mietus alb...@mietus.nl: 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