zfec: hack setuptools bootstrap script not to time.sleep(15) before downloading
This commit is contained in:
parent
bafc236afe
commit
216a2a958a
|
@ -98,8 +98,7 @@ def use_setuptools(
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
||||||
def download_setuptools(
|
def download_setuptools(
|
||||||
version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
|
version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir
|
||||||
delay = 15
|
|
||||||
):
|
):
|
||||||
"""Download setuptools from a specified location and return its filename
|
"""Download setuptools from a specified location and return its filename
|
||||||
|
|
||||||
|
@ -116,14 +115,13 @@ def download_setuptools(
|
||||||
if not os.path.exists(saveto): # Avoid repeated downloads
|
if not os.path.exists(saveto): # Avoid repeated downloads
|
||||||
try:
|
try:
|
||||||
from distutils import log
|
from distutils import log
|
||||||
if delay:
|
if True:
|
||||||
log.warn("""
|
log.warn("""
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
This script requires setuptools version %s to run (even to display
|
This script requires setuptools version %s to run (even to display
|
||||||
help). I will attempt to download it for you (from
|
help). I will attempt to download it for you (from
|
||||||
%s), but
|
%s), but
|
||||||
you may need to enable firewall access for this script first.
|
you may need to enable firewall access for this script first.
|
||||||
I will start the download in %d seconds.
|
|
||||||
|
|
||||||
(Note: if this machine does not have network access, please obtain the file
|
(Note: if this machine does not have network access, please obtain the file
|
||||||
|
|
||||||
|
@ -131,8 +129,8 @@ I will start the download in %d seconds.
|
||||||
|
|
||||||
and place it in this directory before rerunning this script.)
|
and place it in this directory before rerunning this script.)
|
||||||
---------------------------------------------------------------------------""",
|
---------------------------------------------------------------------------""",
|
||||||
version, download_base, delay, url
|
version, download_base, url
|
||||||
); from time import sleep; sleep(delay)
|
);
|
||||||
log.warn("Downloading %s", url)
|
log.warn("Downloading %s", url)
|
||||||
src = urllib2.urlopen(url)
|
src = urllib2.urlopen(url)
|
||||||
# Read/write all in one block, so we don't create a corrupt file
|
# Read/write all in one block, so we don't create a corrupt file
|
||||||
|
|
Loading…
Reference in New Issue