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
Rafael Monnerat
slapos.buildout
Commits
4f1603f1
Commit
4f1603f1
authored
Jul 22, 2009
by
Thomas Lotze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restored Python 2.4 compatibility
parent
71d44b6b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
src/zc/buildout/download.py
src/zc/buildout/download.py
+9
-6
No files found.
src/zc/buildout/download.py
View file @
4f1603f1
...
...
@@ -137,13 +137,14 @@ class Download(object):
"""
parsed_url
=
urlparse
.
urlparse
(
url
,
'file'
)
if
parsed_url
.
scheme
==
'file'
:
url_scheme
,
_
,
url_path
=
parsed_url
[:
3
]
if
url_scheme
==
'file'
:
self
.
logger
.
debug
(
'Using local resource %s'
%
url
)
if
not
check_md5sum
(
parsed_url
.
path
,
md5sum
):
if
not
check_md5sum
(
url_
path
,
md5sum
):
raise
ChecksumError
(
'MD5 checksum mismatch for local resource at %r.'
%
parsed_url
.
path
)
return
locate_at
(
parsed_url
.
path
,
path
)
url_
path
)
return
locate_at
(
url_
path
,
path
)
if
self
.
offline
:
raise
zc
.
buildout
.
UserError
(
...
...
@@ -173,11 +174,13 @@ class Download(object):
return
md5
(
url
).
hexdigest
()
else
:
parsed
=
urlparse
.
urlparse
(
url
)
for
name
in
reversed
(
parsed
.
path
.
split
(
'/'
)):
url_path
=
parsed
[
2
]
for
name
in
reversed
(
url_path
.
split
(
'/'
)):
if
name
:
return
name
else
:
return
'%s:%s'
%
(
parsed
.
host
,
parsed
.
port
)
url_host
,
url_port
=
parsed
[
-
2
:]
return
'%s:%s'
%
(
url_host
,
url_port
)
def
check_md5sum
(
path
,
md5sum
):
...
...
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