Commit 1124ecec authored by Rafael Monnerat's avatar Rafael Monnerat

Do not import Download directly.

  This may cause an import chicken-egg problem, so this also reduce
  the amount of imports to be done.
parent ba0e7204
......@@ -11,7 +11,6 @@ import shutil
import subprocess
import sys
import zc.buildout
from zc.buildout.download import Download
try:
# import from zc.buildout>2
from zc.buildout.buildout import bool_option
......@@ -172,7 +171,8 @@ class Recipe(object):
return self.buildout.get(platform_part)
def download_file(self, url):
download = Download(self.buildout['buildout'], hash_name=True)
download = zc.buildout.download.Download(
self.buildout['buildout'], hash_name=True)
url, _s_, md5sum = url.partition('#')
return download(url, md5sum=md5sum or None)
......
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