[Mpuls-commits] r1403 - in wasko/branches/2.0: . waskaweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Feb 9 16:15:35 CET 2010


Author: bh
Date: 2010-02-09 16:15:35 +0100 (Tue, 09 Feb 2010)
New Revision: 1403

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/waskaweb/controllers/annotations.py
Log:
* waskaweb/controllers/annotations.py (AnnotationsController.help)
(AnnotationsController.required)
(AnnotationsController.evaluation): Fix abort calls.  abort always
raises an exception, so no return is necessary and the first
parameter has to be an int, not a string.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-02-09 15:11:14 UTC (rev 1402)
+++ wasko/branches/2.0/ChangeLog	2010-02-09 15:15:35 UTC (rev 1403)
@@ -1,5 +1,13 @@
 2010-02-09  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/controllers/annotations.py (AnnotationsController.help)
+	(AnnotationsController.required)
+	(AnnotationsController.evaluation): Fix abort calls.  abort always
+	raises an exception, so no return is necessary and the first
+	parameter has to be an int, not a string.
+
+2010-02-09  Bernhard Herzog  <bh at intevation.de>
+
 	* waskaweb/controllers/annotations.py: Remove unused imports.
 
 2010-02-09  Bernhard Herzog  <bh at intevation.de>

Modified: wasko/branches/2.0/waskaweb/controllers/annotations.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/annotations.py	2010-02-09 15:11:14 UTC (rev 1402)
+++ wasko/branches/2.0/waskaweb/controllers/annotations.py	2010-02-09 15:15:35 UTC (rev 1403)
@@ -17,7 +17,7 @@
     def help(self, id):
         nc = g.formedTree.findByName(id)
         if not nc:
-            return abort('404', _('No help available'))
+            abort(404, _('No help available'))
         c.annotation_header = _('Help')
         c.annotation_title = nc.getDescription()
         c.annotation_text = nc.getHelp()
@@ -27,7 +27,7 @@
     def required(self, id):
         nc = g.formedTree.findByName(id)
         if not nc:
-            return abort('404', _('No help available'))
+            abort(404, _('No help available'))
         c.annotation_header = _('Required field')
         c.annotation_title = nc.getDescription()
         c.annotation_text = nc.getRequired()
@@ -37,7 +37,7 @@
     def evaluation(self, id):
         nc = g.formedTree.findByName(id)
         if not nc:
-            return abort('404', _('No help available'))
+            abort(404, _('No help available'))
         c.annotation_header = _('Evaluation relevant field')
         c.annotation_title = nc.getDescription()
         c.annotation_text = nc.getEvaluation()



More information about the Mpuls-commits mailing list