changeset 4640:de10b1613647

drawings: fix KeyError for non-existing map file
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 14 Mar 2009 11:31:55 +0100
parents 49c9b9ba737f
children 43701c896e38
files MoinMoin/formatter/text_html.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/formatter/text_html.py	Sat Mar 14 10:51:47 2009 +0100
+++ b/MoinMoin/formatter/text_html.py	Sat Mar 14 11:31:55 2009 +0100
@@ -670,11 +670,11 @@
         kw['src'] = src = ci.member_url(drawing + u'.png')
         kw['css'] = 'drawing'
 
-        mapfile = ci.get(drawing + u'.map')
         try:
+            mapfile = ci.get(drawing + u'.map')
             map = mapfile.read()
             mapfile.close()
-        except (IOError, OSError):
+        except (KeyError, IOError, OSError):
             map = ''
         if map:
             # we have a image map. inline it and add a map ref to the img tag