Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
isaak yansane-sisk
slapos.buildout
Commits
4a184955
Commit
4a184955
authored
Jun 23, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reviewed strings.
parent
7377e7fd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/zc/buildout/networkcache.py
src/zc/buildout/networkcache.py
+4
-4
No files found.
src/zc/buildout/networkcache.py
View file @
4a184955
...
...
@@ -32,7 +32,7 @@ def _get_md5_from_url(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:
- if yes, the directory key will be pypi-buildout-urlmd5
...
...
@@ -45,7 +45,7 @@ def get_directory_key(url):
def
download_network_cached
(
sha_dir
,
sha_cache
,
path
,
url
,
logger
,
md5sum
=
None
):
"""Download from a network cache provider
"""Download
s
from a network cache provider
If something fail (providor be offline, or hash_string fail), we ignore
network cached files.
...
...
@@ -86,14 +86,14 @@ def download_network_cached(sha_dir, sha_cache, path, url, logger, md5sum=None):
return
False
except
(
IOError
,
DirectoryNotFound
),
e
:
logger
.
info
(
'Fail to download from network cache %s: %s'
%
\
logger
.
info
(
'Fail
ed
to download from network cache %s: %s'
%
\
(
file_name
,
str
(
e
)))
return
False
return
True
def
upload_network_cached
(
sha_cache
,
sha_dir
,
external_url
,
path
,
logger
):
"""Upload file to a
sha
cache server"""
"""Upload file to a
network
cache server"""
try
:
from
slapos.libnetworkcache
import
NetworkcacheClient
,
UploadError
,
\
DirectoryNotFound
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment