mirror of https://github.com/apache/lucene.git
be more clear about JAVA6/7_HOME and don't use silly defaults; on exc downloading file state which file failed
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1470150 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f72566273c
commit
5fb07458d4
|
@ -71,11 +71,10 @@ def verifyJavaVersion(version):
|
|||
|
||||
# http://s.apache.org/lusolr32rc2
|
||||
env = os.environ
|
||||
|
||||
try:
|
||||
JAVA7_HOME = env['JAVA7_HOME']
|
||||
except KeyError:
|
||||
JAVA7_HOME = '/usr/local/jdk1.7.0_01'
|
||||
raise RuntimeError('please set JAVA7_HOME in the env before running smokeTestRelease')
|
||||
print('JAVA7_HOME is %s' % JAVA7_HOME)
|
||||
|
||||
verifyJavaVersion('1.7')
|
||||
|
@ -131,6 +130,7 @@ def download(name, urlString, tmpDir, quiet=False):
|
|||
if not quiet and fileName.find('.asc') == -1:
|
||||
print(' already done: %.1f MB' % (os.path.getsize(fileName)/1024./1024.))
|
||||
return
|
||||
try:
|
||||
fIn = urllib.request.urlopen(urlString)
|
||||
fOut = open(fileName, 'wb')
|
||||
success = False
|
||||
|
@ -150,6 +150,8 @@ def download(name, urlString, tmpDir, quiet=False):
|
|||
os.remove(fileName)
|
||||
if not quiet and fileName.find('.asc') == -1:
|
||||
print(' %.1f MB' % (os.path.getsize(fileName)/1024./1024.))
|
||||
except Exception as e:
|
||||
raise RuntimeError('failed to download url "%s"' % urlString) from e
|
||||
|
||||
def load(urlString):
|
||||
return urllib.request.urlopen(urlString).read().decode('utf-8')
|
||||
|
@ -1276,6 +1278,8 @@ def main():
|
|||
print()
|
||||
print('Usage python -u %s BaseURL version tmpDir' % sys.argv[0])
|
||||
print()
|
||||
print(' example: python3.2 -u dev-tools/scripts/smokeTestRelease.py http://people.apache.org/~whoever/staging_area/lucene-solr-4.3.0-RC1-rev1469340 4.3.0 /path/to/a/tmp/dir')
|
||||
print()
|
||||
sys.exit(1)
|
||||
|
||||
baseURL = sys.argv[1]
|
||||
|
|
Loading…
Reference in New Issue