changeset 2607:2e6227a50d27

fix exception when there are no interwiki map files or page
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 05 Aug 2007 17:25:36 +0200
parents 482f0a9e555c
children 3ff3beef1edf
files MoinMoin/wikiutil.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/wikiutil.py	Sun Aug 05 14:47:10 2007 +0200
+++ b/MoinMoin/wikiutil.py	Sun Aug 05 17:25:36 2007 +0200
@@ -530,8 +530,10 @@
     if page.exists():
         # exists() is cached and thus cheaper than mtime_usecs()
         timestamps.append(version2timestamp(page.mtime_usecs()))
-    return max(timestamps)
-
+    if timestamps:
+        return max(timestamps)
+    else:
+        return 0 # no files / pages there
 
 def load_wikimap(request):
     """ load interwiki map (once, and only on demand) """