Commit c69358f4 authored by Lucas Carvalho's avatar Lucas Carvalho

moved imports to make possible to import check_md5sum into networkcache.py file.

parent 9b1213ff
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment