SVN: toys/stbr/buildlog_link.py
shadzik
shadzik at pld-linux.org
Fri May 28 17:53:02 CEST 2010
Author: shadzik
Date: Fri May 28 17:53:02 2010
New Revision: 11492
Modified:
toys/stbr/buildlog_link.py
Log:
- fix bug where the lighttpd package was mistaken as URL ;) (contains http in the name)
Modified: toys/stbr/buildlog_link.py
==============================================================================
--- toys/stbr/buildlog_link.py (original)
+++ toys/stbr/buildlog_link.py Fri May 28 17:53:02 2010
@@ -18,8 +18,11 @@
except(IndexError):
print "Usage: %s dist buildID [th-arch|ti-arch] [file]" % sys.argv[0]
return
-
- f = open(html, 'r')
+ try:
+ f = open(html, 'r')
+ except IOError:
+ print "File doesn't exist."
+ return
read = f.xreadlines()
for l in read:
l = l.strip()
@@ -35,8 +38,12 @@
try:
if links:
for i in range(len(links)):
- if re.findall("http", links[i]):
- link = links[i].split("\"")[1]
+ if re.findall("\"http", links[i]):
+ try:
+ link = links[i].split("\"")[1]
+ except(IndexError):
+ print "%s" % links[i]
+ return
try:
if re.match("ti", dist):
arch = sys.argv[3].split("ti-")[1]
More information about the pld-cvs-commit
mailing list