Commit 4a184955 authored by Łukasz Nowak's avatar Łukasz Nowak

Reviewed strings.

parent 7377e7fd
...@@ -32,7 +32,7 @@ def _get_md5_from_url(url): ...@@ -32,7 +32,7 @@ def _get_md5_from_url(url):
def get_directory_key(url): def get_directory_key(url):
"""It must retorn the directory key based on the URL. """Returns directory hash based on url.
Basically check if the url belongs to pypi: Basically check if the url belongs to pypi:
- if yes, the directory key will be pypi-buildout-urlmd5 - if yes, the directory key will be pypi-buildout-urlmd5
...@@ -45,7 +45,7 @@ def get_directory_key(url): ...@@ -45,7 +45,7 @@ def get_directory_key(url):
def download_network_cached(sha_dir, sha_cache, path, url, logger, md5sum=None): def download_network_cached(sha_dir, sha_cache, path, url, logger, md5sum=None):
"""Download from a network cache provider """Downloads from a network cache provider
If something fail (providor be offline, or hash_string fail), we ignore If something fail (providor be offline, or hash_string fail), we ignore
network cached files. network cached files.
...@@ -86,14 +86,14 @@ def download_network_cached(sha_dir, sha_cache, path, url, logger, md5sum=None): ...@@ -86,14 +86,14 @@ def download_network_cached(sha_dir, sha_cache, path, url, logger, md5sum=None):
return False return False
except (IOError, DirectoryNotFound), e: except (IOError, DirectoryNotFound), e:
logger.info('Fail to download from network cache %s: %s' % \ logger.info('Failed to download from network cache %s: %s' % \
(file_name, str(e))) (file_name, str(e)))
return False return False
return True return True
def upload_network_cached(sha_cache, sha_dir, external_url, path, logger): def upload_network_cached(sha_cache, sha_dir, external_url, path, logger):
"""Upload file to a shacache server""" """Upload file to a network cache server"""
try: try:
from slapos.libnetworkcache import NetworkcacheClient, UploadError, \ from slapos.libnetworkcache import NetworkcacheClient, UploadError, \
DirectoryNotFound DirectoryNotFound
......
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