summaryrefslogtreecommitdiffstats
path: root/website
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@lupin.entrouvert.com>2010-07-27 16:13:07 +0200
committerBenjamin Dauvergne <bdauvergne@lupin.entrouvert.com>2010-07-27 16:13:07 +0200
commit31a26948bf6aec1d956d14291054a206f2756737 (patch)
tree4562c514f0e2b8dcf83cac48e2d37f8dc4645499 /website
parent274670628f0adae7c547dd04c4017156025b5339 (diff)
downloadlasso-31a26948bf6aec1d956d14291054a206f2756737.tar.gz
lasso-31a26948bf6aec1d956d14291054a206f2756737.tar.xz
lasso-31a26948bf6aec1d956d14291054a206f2756737.zip
[Website] in convert-to-static.py, work around errors in build logs
If Build() constructor fails, keep going.
Diffstat (limited to 'website')
-rw-r--r--website/convert-to-static.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/website/convert-to-static.py b/website/convert-to-static.py
index 83e61d93..a1107644 100644
--- a/website/convert-to-static.py
+++ b/website/convert-to-static.py
@@ -134,7 +134,6 @@ re_summary = re.compile('[a-z]+\.[0-9]{4}.xml')
if not os.path.exists('web-static'):
os.mkdir('web-static')
-
for BUILDLOGS_DIR in ('build-logs', 'build-logs-wsf'):
if not os.path.exists('web/%s' % BUILDLOGS_DIR):
continue
@@ -142,7 +141,7 @@ for BUILDLOGS_DIR in ('build-logs', 'build-logs-wsf'):
os.mkdir('web-static/%s' % BUILDLOGS_DIR)
for base, dirs, files in os.walk('web/%s' % BUILDLOGS_DIR):
- if base.endswith('/CVS') or base.endswith('/.svn'):
+ if base.endswith('/CVS') or base.endswith('/.svn') or base.endswith('/.git'):
continue
for dirname in dirs:
src_file = os.path.join(base, dirname)
@@ -225,9 +224,12 @@ for BUILDLOGS_DIR in ('build-logs', 'build-logs-wsf'):
main_page = main_page[:50]
builds = []
for filename in main_page:
- builds.append( Build(xml.dom.minidom.parse(filename)) )
- if len(builds) > 1 and builds[-2].date[:8] == builds[-1].date[:8]:
- builds[-1].display_date = ''
+ try:
+ builds.append( Build(xml.dom.minidom.parse(filename)) )
+ if len(builds) > 1 and builds[-2].date[:8] == builds[-1].date[:8]:
+ builds[-1].display_date = ''
+ except:
+ pass
fd = StringIO()
buildlog_template.generate(fd, {'build': builds})
@@ -260,7 +262,7 @@ for base, dirs, files in os.walk('web'):
src_file = os.path.join(base, filename)
dst_file = 'web-static/' + src_file[4:]
- if os.path.isdir(src_file): continue
+ if os.path.isdir(src_file): continue
if os.path.exists(dst_file) and \
os.stat(dst_file)[stat.ST_MTIME] >= os.stat(src_file)[stat.ST_MTIME]: