changeset 1051:ac85f3b79216

Bugfix, convert the exception yielded by exec.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Tue, 25 Jul 2006 00:46:21 +0200
parents b7544e3bd478
children 018bb4266d57
files MoinMoin/Page.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Mon Jul 24 22:18:49 2006 +0200
+++ b/MoinMoin/Page.py	Tue Jul 25 00:46:21 2006 +0200
@@ -1389,7 +1389,11 @@
         import MoinMoin
         if hasattr(MoinMoin, '__loader__'):
             __file__ = os.path.join(MoinMoin.__loader__.archive, 'dummy')
-        exec code
+
+        try:
+            exec code
+        except "CacheNeedsUpdate": # convert the exception
+            raise Exception("CacheNeedsUpdate")
 
     def loadCache(self, request):
         """ Return page content cache or raises 'CacheNeedsUpdate' """