Closed BoboTiG closed 3 years ago
Hm closing as it would change the old behavior a little too much.
FTR the full patch was:
def file_url_to_local_path(file_url):
parts = urlparse(file_url)
path = url2pathname(parts.path)
try:
return path if isfile(path) else None
except (OSError, IOError):
# IOError for Python 2
# OSError for Python 3
return None
Relying on url2pathname() would simplify the current implementation.