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
7becb258
Commit
7becb258
authored
Jun 16, 2011
by
Lucas Carvalho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We do not need to keep a log under buildout.
Removed useless method which should not exist.
parent
1b59eb89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
33 deletions
+0
-33
src/zc/buildout/networkcache.py
src/zc/buildout/networkcache.py
+0
-33
No files found.
src/zc/buildout/networkcache.py
View file @
7becb258
...
...
@@ -33,38 +33,6 @@ def _get_md5_from_url(url):
return
None
def
_update_network_cached_log
(
path
,
url
):
"""Update the networkcached.log file.
Adding the last key and URL which has been retrieved from shacache server.
"""
f
=
open
(
path
,
'r'
)
try
:
key
=
hashlib
.
sha512
(
f
.
read
()).
hexdigest
()
finally
:
f
.
close
()
# Keep the log
map_path
=
os
.
path
.
join
(
os
.
environ
.
get
(
'PWD'
),
'.networkcached.log'
)
mode
=
'r+'
if
not
os
.
path
.
exists
(
map_path
):
mode
=
'w+'
f
=
open
(
map_path
,
mode
)
try
:
flag
=
False
for
line
in
f
:
if
url
in
line
:
flag
=
True
break
if
not
flag
:
f
.
seek
(
0
,
2
)
f
.
write
(
'%s %s
\
n
'
%
(
key
,
url
))
f
.
truncate
(
f
.
tell
())
finally
:
f
.
close
()
def
select_sha512sum_from_shadir
(
sha_dir
,
url
,
logger
):
"""It must return the sha512sum if exists on selected directory. """
# On buildout.cfg the option sha-dir is the complete link including the
...
...
@@ -145,7 +113,6 @@ def upload_network_cached(sha_cache, sha_dir, external_url, path, logger):
nc
=
NetworkcacheClient
(
shacache
=
sha_cache
,
shadir
=
sha_dir_without_directory_key
)
data
=
nc
.
upload
(
f
,
directory_key
,
**
kw
)
_update_network_cached_log
(
path
,
external_url
)
except
(
IOError
,
UploadError
),
e
:
logger
.
info
(
'Fail to upload file. %s'
%
\
(
str
(
e
)))
...
...
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