From 5e8e77dfad2af0d07a49c1cee49548667e70a967 Mon Sep 17 00:00:00 2001 From: Anton Bobrov Date: Jul 07 2023 08:50:21 +0000 Subject: Add StreamLookasideCache specific get_download_url method --- diff --git a/src/centpkg/lookaside.py b/src/centpkg/lookaside.py index 9de5157..2214d57 100644 --- a/src/centpkg/lookaside.py +++ b/src/centpkg/lookaside.py @@ -64,6 +64,12 @@ class StreamLookasideCache(CGILookasideCache): hashtype, download_url, upload_url, 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): """ Check if a remote file exists.