[Mpuls-commits] r1857 - in wasko/branches/2.0: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Feb 26 20:20:39 CET 2010


Author: bh
Date: 2010-02-26 20:20:37 +0100 (Fri, 26 Feb 2010)
New Revision: 1857

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/lib/app_globals.py
Log:
* mpulsweb/lib/app_globals.py (Globals.__init__): The
AnnotationsProvider already handles missing files gracefully, so
there's no need to ignore any exceptions at this point.  If the
annotation file is broken, it's better to fail noisily, than to
pretend there are no annotations.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-02-26 19:05:11 UTC (rev 1856)
+++ wasko/branches/2.0/ChangeLog	2010-02-26 19:20:37 UTC (rev 1857)
@@ -1,5 +1,13 @@
 2010-02-26  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/lib/app_globals.py (Globals.__init__): The
+	AnnotationsProvider already handles missing files gracefully, so
+	there's no need to ignore any exceptions at this point.  If the
+	annotation file is broken, it's better to fail noisily, than to
+	pretend there are no annotations.
+
+2010-02-26  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/lib/config.py (MpulsConfig.__init__): Register the json
 	config file with paste so that the paste server restarts
 	automatically when the file changes.

Modified: wasko/branches/2.0/mpulsweb/lib/app_globals.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/app_globals.py	2010-02-26 19:05:11 UTC (rev 1856)
+++ wasko/branches/2.0/mpulsweb/lib/app_globals.py	2010-02-26 19:20:37 UTC (rev 1857)
@@ -73,13 +73,7 @@
         # Build FormedTree. This tree will work as template for all cases
         log.debug("loading formed definition from %r", formed_file)
         self.formedTree = openDocument(formed_file)
-        try:
-            self.helpData = AnnotationsProvider(annotation_file)
-        except:
-            # annotations are optional
-            # FIXME: it would be better to distinguish between a missing
-            # file and parse errors.
-            log.exception("Could not open helpfile %r", annotation_file)
+        self.helpData = AnnotationsProvider(annotation_file)
 
 
         # TODO: These setups should be while application intialisation, as they



More information about the Mpuls-commits mailing list