Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.libnetworkcache
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
Łukasz Nowak
slapos.libnetworkcache
Commits
97dbdc77
Commit
97dbdc77
authored
Sep 04, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't raise if there is no matching entry
parent
86264fb8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
slapos/networkcachehelper.py
slapos/networkcachehelper.py
+10
-11
No files found.
slapos/networkcachehelper.py
View file @
97dbdc77
...
@@ -198,6 +198,7 @@ def helper_download_network_cached(dir_url, cache_url,
...
@@ -198,6 +198,7 @@ def helper_download_network_cached(dir_url, cache_url,
matching_entry_list
.
append
(
tags
)
matching_entry_list
.
append
(
tags
)
except
Exception
:
except
Exception
:
pass
pass
if
matching_entry_list
:
# If a strategy is defined, call it to determine best entry
# If a strategy is defined, call it to determine best entry
if
strategy
:
if
strategy
:
best_entry
=
strategy
(
matching_entry_list
)
best_entry
=
strategy
(
matching_entry_list
)
...
@@ -210,8 +211,6 @@ def helper_download_network_cached(dir_url, cache_url,
...
@@ -210,8 +211,6 @@ def helper_download_network_cached(dir_url, cache_url,
# download best entry
# download best entry
file_descriptor
=
nc
.
download
(
best_entry
.
get
(
'sha512'
))
file_descriptor
=
nc
.
download
(
best_entry
.
get
(
'sha512'
))
if
file_descriptor
is
not
None
:
return
file_descriptor
,
tags
return
file_descriptor
,
tags
else
:
else
:
logger
.
info
(
'No matching entry to download from network cache: %s'
\
logger
.
info
(
'No matching entry to download from network cache: %s'
\
...
...
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