Add StreamLookasideCache specific get_download_url method

This commit is contained in:
Anton Bobrov 2023-07-07 10:50:21 +02:00
parent 5fd982bf00
commit 5e8e77dfad

View file

@ -64,6 +64,12 @@ class StreamLookasideCache(CGILookasideCache):
hashtype, download_url, upload_url, hashtype, download_url, upload_url,
client_cert=client_cert, ca_cert=ca_cert) client_cert=client_cert, ca_cert=ca_cert)
def get_download_url(self, name, filename, hash, hashtype=None, **kwargs):
_name = utils.get_repo_name(name) if is_dist_git(os.getcwd()) else name
return super(StreamLookasideCache, self).get_download_url(
_name, filename, hash, hashtype=hashtype, **kwargs)
def remote_file_exists(self, name, filename, hashstr): def remote_file_exists(self, name, filename, hashstr):
""" """
Check if a remote file exists. Check if a remote file exists.