[Mpuls-commits] r366 - in wasko/trunk: . waskaweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Mar 11 17:02:57 CET 2009
Author: teichmann
Date: 2009-03-11 17:02:34 +0100 (Wed, 11 Mar 2009)
New Revision: 366
Modified:
wasko/trunk/ChangeLog.txt
wasko/trunk/waskaweb/model/casedocument.py
wasko/trunk/waskaweb/model/datapage.py
wasko/trunk/waskaweb/model/phases_factory.py
Log:
Added handling for error class 'notice' which is a kind of global warning.
Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt 2009-03-11 15:45:45 UTC (rev 365)
+++ wasko/trunk/ChangeLog.txt 2009-03-11 16:02:34 UTC (rev 366)
@@ -1,5 +1,16 @@
2009-03-11 Sascha L. Teichmann <teichmann at intevation.de>
+ Added handling for error class 'notice' which is a kind of
+ global warning.
+
+ * waskaweb/model/datapage.py: Do not recognize 'notice' as errors
+
+ * waskaweb/model/casedocument.py: recognize 'notice' as warning on page.
+
+ * waskaweb/model/phases_factory.py: removed needless import.
+
+2009-03-11 Sascha L. Teichmann <teichmann at intevation.de>
+
Fixed issue86
* waskaweb/model/navigation.py: added generator function to
Modified: wasko/trunk/waskaweb/model/casedocument.py
===================================================================
--- wasko/trunk/waskaweb/model/casedocument.py 2009-03-11 15:45:45 UTC (rev 365)
+++ wasko/trunk/waskaweb/model/casedocument.py 2009-03-11 16:02:34 UTC (rev 366)
@@ -41,7 +41,8 @@
import re
import sys
-WARNING = re.compile(r"warning\s*:\s*([^\s]+)")
+WARNING = re.compile(r"warning\s*:\s*([^\s]+)")
+WARNING_NOTICE = re.compile(r"(?:warning|notice)\s*:\s*([^\s]+)")
page_cache = StackedObjectProxy(name="waska.pagecache")
@@ -203,7 +204,7 @@
mark, expr = r.getMark(), r.getExpr()
if not mark or not expr: continue
# warnings only
- mark = WARNING.search(mark)
+ mark = WARNING_NOTICE.search(mark)
if not mark: continue
mark = mark.group(1)
# only mark if field is on current page
Modified: wasko/trunk/waskaweb/model/datapage.py
===================================================================
--- wasko/trunk/waskaweb/model/datapage.py 2009-03-11 15:45:45 UTC (rev 365)
+++ wasko/trunk/waskaweb/model/datapage.py 2009-03-11 16:02:34 UTC (rev 366)
@@ -224,7 +224,7 @@
for r in document.findAllByClass(RuleLeaf):
mark = r.getMark()
# warning rules are evaluated at page rendering
- if mark and mark.find("warning:") >= 0:
+ if mark and mark.find("warning:") >= 0 or mark.find("notice:") >= 0:
#print "Ignore warning rule '%s'" % r.getName()
continue
expr = r.getExpr()
Modified: wasko/trunk/waskaweb/model/phases_factory.py
===================================================================
--- wasko/trunk/waskaweb/model/phases_factory.py 2009-03-11 15:45:45 UTC (rev 365)
+++ wasko/trunk/waskaweb/model/phases_factory.py 2009-03-11 16:02:34 UTC (rev 366)
@@ -31,7 +31,7 @@
from waskaweb.model.phases import *
from waskaweb.model.phase_transition import *
-from waskaweb.model.data import PageNode, WidgetCollector, DateLeaf, RuleLeaf
+from waskaweb.model.data import PageNode
from waskaweb.model.casedocument import WARNING
More information about the Mpuls-commits
mailing list