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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.buildout
Commits
16bc0515
Commit
16bc0515
authored
Mar 22, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bug_778748'
parents
8ce62d5e
c9545718
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
src/zc/buildout/networkcache.py
src/zc/buildout/networkcache.py
+8
-3
No files found.
src/zc/buildout/networkcache.py
View file @
16bc0515
...
...
@@ -18,6 +18,7 @@ import os
import
posixpath
import
re
import
shutil
import
urllib2
import
urlparse
import
traceback
...
...
@@ -106,7 +107,7 @@ def download_network_cached(dir_url, cache_url, path, url, logger,
logger
.
warning
(
'Incompatible version of networkcache, not using it.'
)
return
False
logger
.
info
(
'Downloading %s from network cache
.'
%
url
)
logger
.
debug
(
'Trying to download %s from network cache..
.'
%
url
)
try
:
file_descriptor
=
nc
.
select
(
directory_key
)
...
...
@@ -116,14 +117,18 @@ def download_network_cached(dir_url, cache_url, path, url, logger,
finally
:
f
.
close
()
file_descriptor
.
close
()
logger
.
info
(
'Downloaded %s from network cache.'
%
url
)
if
not
check_md5sum
(
path
,
md5sum
):
logger
.
info
(
'MD5 checksum mismatch downloading %s'
%
url
)
return
False
except
(
IOError
,
DirectoryNotFound
),
e
:
logger
.
info
(
'Failed to download from network cache %s: %s'
%
\
(
url
,
str
(
e
)))
if
isinstance
(
e
,
urllib2
.
HTTPError
)
and
e
.
code
==
404
:
logger
.
debug
(
'%s does not exist in network cache.'
%
url
)
else
:
logger
.
debug
(
'Failed to download from network cache %s: %s'
%
\
(
url
,
str
(
e
)))
return
False
return
True
...
...
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