Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ophélie Gagnard
slapos.core
Commits
9cb0c3d8
Commit
9cb0c3d8
authored
Dec 08, 2021
by
Léo-Paul Géneau
👾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
networkcache: remove not lazy formatting in logger
Leave string interpolation to the logging method
parent
d716c541
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
slapos/grid/networkcache.py
slapos/grid/networkcache.py
+5
-5
No files found.
slapos/grid/networkcache.py
View file @
9cb0c3d8
...
...
@@ -108,7 +108,7 @@ def download_network_cached(cache_url, dir_url, software_url, software_root,
logger
.
warning
(
'Incompatible version of networkcache, not using it.'
)
return
False
logger
.
info
(
'Downloading %s binary from network cache.'
%
software_url
)
logger
.
info
(
'Downloading %s binary from network cache.'
,
software_url
)
try
:
file_descriptor
=
None
machine_info
=
machine_info_tuple
()
...
...
@@ -129,8 +129,8 @@ def download_network_cached(cache_url, dir_url, software_url, software_root,
file_descriptor
.
close
()
return
True
except
(
IOError
,
DirectoryNotFound
)
as
e
:
logger
.
info
(
'Failed to download from network cache %s: %s'
%
\
(
software_url
,
str
(
e
))
)
logger
.
info
(
'Failed to download from network cache %s: %s'
,
software_url
,
e
)
return
False
...
...
@@ -147,7 +147,7 @@ def upload_network_cached(software_root, software_url, cached_key,
and
cache_url
and
dir_url
):
return
False
logger
.
info
(
'Uploading %s binary into network cache.'
%
software_url
)
logger
.
info
(
'Uploading %s binary into network cache.'
,
software_url
)
# YXU: "file" and "urlmd5" should be removed when server side is ready
kw
=
dict
(
...
...
@@ -191,7 +191,7 @@ def upload_network_cached(software_root, software_url, cached_key,
try
:
return
nc
.
upload_generic
(
f
,
cached_key
,
**
kw
)
except
(
IOError
,
UploadError
)
as
e
:
logger
.
info
(
'Failed to upload file. %s'
%
str
(
e
)
)
logger
.
info
(
'Failed to upload file. %s'
,
e
)
return
False
finally
:
f
.
close
()
...
...
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