[Mpuls-commits] r521 - in wasko/trunk: . waskaweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jun 2 17:41:56 CEST 2009


Author: teichmann
Date: 2009-06-02 17:41:55 +0200 (Tue, 02 Jun 2009)
New Revision: 521

Modified:
   wasko/trunk/ChangeLog.txt
   wasko/trunk/waskaweb/model/semantic.py
Log:
Fixed issue247 (next attempt)



Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt	2009-06-02 08:57:30 UTC (rev 520)
+++ wasko/trunk/ChangeLog.txt	2009-06-02 15:41:55 UTC (rev 521)
@@ -1,3 +1,9 @@
+2009-06-02	Sascha L. Teichmann <sascha.teichmann at intevation.de>
+
+	Fixed issue247 (next attempt)
+
+	* waskaweb/model/semantic.py: fixed regular expressions.
+
 2009-06-02	Torsten Irlaender  <torsten.irlaender at intevation.de> 
 
 	Fixed issue142

Modified: wasko/trunk/waskaweb/model/semantic.py
===================================================================
--- wasko/trunk/waskaweb/model/semantic.py	2009-06-02 08:57:30 UTC (rev 520)
+++ wasko/trunk/waskaweb/model/semantic.py	2009-06-02 15:41:55 UTC (rev 521)
@@ -165,13 +165,13 @@
 
 class DateChecker(ValueChecker):
 
-    DATE         = re.compile(r"([0-9]{1,2})\.([0-9]{1,2})\.([0-9]{2,4})")
+    DATE         = re.compile(r"^([0-9]{1,2})\.([0-9]{1,2})\.([0-9]{2,4})$")
     DATE_IDX     = (1, 2, 3)
-    DATE_ISO     = re.compile(r"([0-9]{2,4})-([0-9]{1,2})-([0-9]{1,2})")
+    DATE_ISO     = re.compile(r"^([0-9]{2,4})-([0-9]{1,2})-([0-9]{1,2})$")
     DATE_ISO_IDX = (3, 2, 1)
-    YEAR         = re.compile(r"([0-9]{1,4})")
+    YEAR         = re.compile(r"^([0-9]{1,4})$")
 
-    DAY_MONTH    = re.compile(r"([0-9]{1,2})\.([0-9]{1,2})")
+    DAY_MONTH    = re.compile(r"^([0-9]{1,2})\.([0-9]{1,2})$")
 
     def convert(self, value, nc):
         return self.checkAndConvert(value, nc)



More information about the Mpuls-commits mailing list