[Mpuls-commits] r370 - in wasko/trunk: . waskaweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Mar 12 17:22:00 CET 2009
Author: torsten
Date: 2009-03-12 17:21:58 +0100 (Thu, 12 Mar 2009)
New Revision: 370
Modified:
wasko/trunk/ChangeLog.txt
wasko/trunk/waskaweb/model/__init__.py
wasko/trunk/waskaweb/model/exprtree.py
Log:
Changed definition of new "known"-operator
Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt 2009-03-12 13:35:59 UTC (rev 369)
+++ wasko/trunk/ChangeLog.txt 2009-03-12 16:21:58 UTC (rev 370)
@@ -22,6 +22,9 @@
waskaweb/model/document.py: Files will be overwritten if the user
uploads a file with the same name.
+ * waskaweb/model/exprtree.py
+ waskaweb/model/__init__.py: Changed definition of new "known"-operator
+
2009-03-11 Sascha L. Teichmann <teichmann at intevation.de>
* waskaweb/model/casedocument.py: generate HTML for links on phase page.
Modified: wasko/trunk/waskaweb/model/__init__.py
===================================================================
--- wasko/trunk/waskaweb/model/__init__.py 2009-03-12 13:35:59 UTC (rev 369)
+++ wasko/trunk/waskaweb/model/__init__.py 2009-03-12 16:21:58 UTC (rev 370)
@@ -24,6 +24,7 @@
from datetime import date
+UNKNOWN_STR = 'unbekannt'
UNKNOWN_INT = -9999999
UNKNOWN_DATE = date(1, 1, 1)
Modified: wasko/trunk/waskaweb/model/exprtree.py
===================================================================
--- wasko/trunk/waskaweb/model/exprtree.py 2009-03-12 13:35:59 UTC (rev 369)
+++ wasko/trunk/waskaweb/model/exprtree.py 2009-03-12 16:21:58 UTC (rev 370)
@@ -37,7 +37,7 @@
from datetime import date
from types import StringTypes
-from waskaweb.model import UNKNOWN_DATE, UNKNOWN_INT
+from waskaweb.model import UNKNOWN_DATE, UNKNOWN_INT, UNKNOWN_STR
FLT_RE = re.compile(r'^([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)$')
INT_RE = re.compile(r'^([-+]?[0-9]+)$')
@@ -210,10 +210,9 @@
def KNOWN(a):
return not (
- a is None \
- or a == UNKNOWN_INT \
+ a == UNKNOWN_INT \
or a == UNKNOWN_DATE \
- or (type(a) in StringTypes and not a))
+ or (type(a) in StringTypes and a.lower() == UNKNOWN_STR))
NODE_FACTORIES = {
'+': lambda s: OperatorBinary(s.pop(), s.pop(), ADD),
More information about the Mpuls-commits
mailing list