Fix for an error that appears when run on empty repository.
Mon Oct 31 10:24:23 UTC 2005 Michal Sojka <sojkam1@fel.cvut.cz>
* Fix for an error that appears when run on empty repository.
diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi
--- old-darcsweb/darcsweb.cgi 2016-01-18 08:32:30.000000000 +0000
+++ new-darcsweb/darcsweb.cgi 2016-01-18 08:32:30.000000000 +0000
@@ -1117,7 +1117,8 @@
print '<table cellspacing="0">'
print ' <tr><td>description</td><td>%s</td></tr>' % config.repodesc
print ' <tr><td>owner</td><td>%s</td></tr>' % escape(owner)
- print ' <tr><td>last change</td><td>%s</td></tr>' % \
+ if len(ps) > 0:
+ print ' <tr><td>last change</td><td>%s</td></tr>' % \
ps[0].local_date_str
print ' <tr><td>url</td><td><a href="%(url)s">%(url)s</a></td></tr>' %\
{ 'url': config.repourl }