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
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
isaak yansane-sisk
slapos.buildout
Commits
c69358f4
Commit
c69358f4
authored
May 17, 2011
by
Lucas Carvalho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved imports to make possible to import check_md5sum into networkcache.py file.
parent
9b1213ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
src/zc/buildout/download.py
src/zc/buildout/download.py
+4
-6
No files found.
src/zc/buildout/download.py
View file @
c69358f4
...
...
@@ -17,7 +17,6 @@ try:
from
hashlib
import
md5
except
ImportError
:
from
md5
import
new
as
md5
from
zc.buildout.easy_install
import
realpath
import
logging
import
os
import
os.path
...
...
@@ -40,10 +39,6 @@ class ChecksumError(zc.buildout.UserError):
url_opener
=
URLOpener
()
from
zc.buildout.networkcache
import
download_network_cached
,
\
upload_network_cached
class
Download
(
object
):
"""Configurable download utility.
...
...
@@ -183,7 +178,7 @@ class Download(object):
try
:
try
:
if
not
download_network_cached
(
self
.
network_cache
,
tmp_path
,
url
,
self
.
logger
):
url
,
self
.
logger
,
md5sum
):
# Download from original url
tmp_path
,
headers
=
urllib
.
urlretrieve
(
url
,
tmp_path
)
...
...
@@ -258,6 +253,9 @@ def remove(path):
if
os
.
path
.
exists
(
path
):
os
.
remove
(
path
)
from
zc.buildout.networkcache
import
download_network_cached
,
\
upload_network_cached
from
zc.buildout.easy_install
import
realpath
def
locate_at
(
source
,
dest
):
if
dest
is
None
or
realpath
(
dest
)
==
realpath
(
source
):
...
...
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