mirror of
https://github.com/clearml/clearml
synced 2025-04-27 01:39:17 +00:00
Version bump to v1.11.2rc0
Small refactoring
This commit is contained in:
parent
3f882c37b9
commit
5aa80267d6
@ -2414,7 +2414,7 @@ class StorageHelper(object):
|
||||
|
||||
if self.scheme in StorageHelper._quotable_uri_schemes: # TODO: fix-driver-schema
|
||||
# quote link
|
||||
result_dest_path = quote_url(result_dest_path)
|
||||
result_dest_path = quote_url(result_dest_path, StorageHelper._quotable_uri_schemes)
|
||||
|
||||
return result_dest_path
|
||||
|
||||
@ -2436,7 +2436,7 @@ class StorageHelper(object):
|
||||
|
||||
# quote link
|
||||
def callback(result):
|
||||
return a_cb(quote_url(result_path) if result else result)
|
||||
return a_cb(quote_url(result_path, StorageHelper._quotable_uri_schemes) if result else result)
|
||||
# replace callback with wrapper
|
||||
cb = callback
|
||||
|
||||
@ -2463,7 +2463,7 @@ class StorageHelper(object):
|
||||
retries=retries,
|
||||
return_canonized=return_canonized)
|
||||
if res:
|
||||
result_path = quote_url(result_path)
|
||||
result_path = quote_url(result_path, StorageHelper._quotable_uri_schemes)
|
||||
return result_path
|
||||
|
||||
def list(self, prefix=None, with_metadata=False):
|
||||
|
@ -42,9 +42,9 @@ def get_config_object_matcher(**patterns):
|
||||
return _matcher
|
||||
|
||||
|
||||
def quote_url(url):
|
||||
def quote_url(url, valid_schemes=("http", "https")):
|
||||
parsed = urlparse(url)
|
||||
if parsed.scheme not in ("http", "https"):
|
||||
if parsed.scheme not in valid_schemes:
|
||||
return url
|
||||
parsed = parsed._replace(path=quote(parsed.path))
|
||||
return urlunparse(parsed)
|
||||
|
@ -1 +1 @@
|
||||
__version__ = '1.11.1'
|
||||
__version__ = '1.11.2rc0'
|
||||
|
Loading…
Reference in New Issue
Block a user