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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Douglas
slapos.libnetworkcache
Commits
1216b465
Commit
1216b465
authored
Dec 11, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't hide loggers, especially when it is error
parent
c52c2dcb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
slapos/networkcachehelper.py
slapos/networkcachehelper.py
+4
-3
No files found.
slapos/networkcachehelper.py
View file @
1216b465
...
@@ -23,6 +23,7 @@ from slapos.libnetworkcache import NetworkcacheClient, UploadError, \
...
@@ -23,6 +23,7 @@ from slapos.libnetworkcache import NetworkcacheClient, UploadError, \
logging
.
basicConfig
()
logging
.
basicConfig
()
logger
=
logging
.
getLogger
(
'networkcachehelper'
)
logger
=
logging
.
getLogger
(
'networkcachehelper'
)
logger
.
setLevel
(
logging
.
INFO
)
def
_split_last_directory
(
path
):
def
_split_last_directory
(
path
):
"""
"""
...
@@ -169,7 +170,7 @@ def helper_download_network_cached(dir_url, cache_url,
...
@@ -169,7 +170,7 @@ def helper_download_network_cached(dir_url, cache_url,
logger
.
warning
(
'Incompatible version of networkcache, not using it.'
)
logger
.
warning
(
'Incompatible version of networkcache, not using it.'
)
return
False
return
False
logger
.
debug
(
'Trying to download %s from network cache...'
%
directory_key
)
logger
.
info
(
'Trying to download %s from network cache...'
%
directory_key
)
try
:
try
:
file_descriptor
=
None
file_descriptor
=
None
json_entry_list
=
nc
.
select_generic
(
directory_key
)
json_entry_list
=
nc
.
select_generic
(
directory_key
)
...
@@ -219,9 +220,9 @@ def helper_download_network_cached(dir_url, cache_url,
...
@@ -219,9 +220,9 @@ def helper_download_network_cached(dir_url, cache_url,
except
(
IOError
,
DirectoryNotFound
),
e
:
except
(
IOError
,
DirectoryNotFound
),
e
:
if
isinstance
(
e
,
urllib2
.
HTTPError
)
and
e
.
code
==
404
:
if
isinstance
(
e
,
urllib2
.
HTTPError
)
and
e
.
code
==
404
:
logger
.
debug
(
'%s does not exist in network cache.'
%
directory_key
)
logger
.
info
(
'%s does not exist in network cache.'
%
directory_key
)
else
:
else
:
logger
.
debu
g
(
'Failed to download from network cache %s: %s'
%
(
logger
.
warnin
g
(
'Failed to download from network cache %s: %s'
%
(
directory_key
,
str
(
e
)))
directory_key
,
str
(
e
)))
return
False
return
False
...
...
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