diff MoinMoin/wikiutil.py @ 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 f4c371b00fec
children c6b5c2d813b6 6cb75379c073
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) """