Commit a4f4b49f authored by Lucas Carvalho's avatar Lucas Carvalho

Removed useless method.

parent e03925d0
......@@ -46,25 +46,6 @@ def get_directory_key(url):
return 'pypi-buildout-%s' % urlmd5
return 'slapos-buildout-%s' % urlmd5
def select_sha512sum_from_shadir(sha_dir, url, logger):
"""It must return the sha512sum if exists on selected directory. """
directory_key = get_directory_key(url)
try:
nc = NetworkcacheClient(shadir=sha_dir)
data_list = nc.select(directory_key)
except (IOError, DirectoryNotFound, MultipleFileFoundError), e:
logger.info('Could not retrieve the information from SHADIR. %s' % e)
return None
urlmd5 = hashlib.md5(url).hexdigest()
for data in data_list:
information_dict, signature = data
if information_dict.get('urlmd5') == urlmd5:
return information_dict.get('sha512')
return None
def download_network_cached(sha_dir, sha_cache, path, url, logger, md5sum=None):
"""Download from a network cache provider
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment