You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2012/09/24 14:30:47 UTC
svn commit: r1389333 - in /lucene/dev/branches/branch_4x: ./ dev-tools/
dev-tools/scripts/smokeTestRelease.py
Author: mikemccand
Date: Mon Sep 24 12:30:46 2012
New Revision: 1389333
URL: http://svn.apache.org/viewvc?rev=1389333&view=rev
Log:
get smoke tester working with shortened URL again (python3 upgrade broke it)
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/dev-tools/ (props changed)
lucene/dev/branches/branch_4x/dev-tools/scripts/smokeTestRelease.py
Modified: lucene/dev/branches/branch_4x/dev-tools/scripts/smokeTestRelease.py
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/dev-tools/scripts/smokeTestRelease.py?rev=1389333&r1=1389332&r2=1389333&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/dev-tools/scripts/smokeTestRelease.py (original)
+++ lucene/dev/branches/branch_4x/dev-tools/scripts/smokeTestRelease.py Mon Sep 24 12:30:46 2012
@@ -16,6 +16,7 @@
import os
import tarfile
import threading
+import traceback
import subprocess
import signal
import shutil
@@ -43,7 +44,7 @@ def unshortenURL(url):
h = http.client.HTTPConnection(parsed.netloc)
h.request('HEAD', parsed.path)
response = h.getresponse()
- if response.status/100 == 3 and response.getheader('Location'):
+ if int(response.status/100) == 3 and response.getheader('Location'):
return response.getheader('Location')
return url
@@ -112,7 +113,14 @@ def getHREFs(urlString):
break
links = []
- for subUrl, text in reHREF.findall(urllib.request.urlopen(urlString).read().decode('UTF-8')):
+ try:
+ html = urllib.request.urlopen(urlString).read().decode('UTF-8')
+ except:
+ print('\nFAILED to open url %s' % urlString)
+ tracekback.print_exc()
+ raise
+
+ for subUrl, text in reHREF.findall(html):
fullURL = urllib.parse.urljoin(urlString, subUrl)
links.append((text, fullURL))
return links