[Mpuls-commits] r451 - in wasko/trunk: . waskaweb/converter

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Apr 1 11:31:10 CEST 2009


Author: teichmann
Date: 2009-04-01 11:31:10 +0200 (Wed, 01 Apr 2009)
New Revision: 451

Modified:
   wasko/trunk/ChangeLog.txt
   wasko/trunk/waskaweb/converter/wasko_v1v2.py
Log:
Import fix for issue128


Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt	2009-04-01 09:06:57 UTC (rev 450)
+++ wasko/trunk/ChangeLog.txt	2009-04-01 09:31:10 UTC (rev 451)
@@ -1,3 +1,10 @@
+2009-04-01	Sascha L. Teichmann	<teichmann at intevation.de>
+
+	Fixed issue128:
+
+	* waskaweb/converter/wasko_v1v2.py: Added converter to eliminate
+	  f_kf_meth_c_1 during import.
+
 2009-04-01	Torsten Irlaender  <torsten.irlaender at intevation.de> 
 
 	Fixed issue129

Modified: wasko/trunk/waskaweb/converter/wasko_v1v2.py
===================================================================
--- wasko/trunk/waskaweb/converter/wasko_v1v2.py	2009-04-01 09:06:57 UTC (rev 450)
+++ wasko/trunk/waskaweb/converter/wasko_v1v2.py	2009-04-01 09:31:10 UTC (rev 451)
@@ -69,15 +69,28 @@
 class WaskoV1V2(object):
 
     def __init__(self):
-        self.data      = {}
-        self.nat_staat = None
+        self.data          = {}
+        self.nat_staat     = None
+        self.f_kf_meth_c_1 = None
+        self.f_kf_meth_f_1 = None
 
+
     def reset(self):
         self.data.clear()
-        self.nat_staat = None
+        self.nat_staat     = None
+        self.f_kf_meth_c_1 = None
+        self.f_kf_meth_f_1 = None
 
     def eat(self, name, attrs, value):
 
+        if name == 'f_kf_meth_c_1':
+            self.f_kf_meth_c_1 = value
+            return True
+
+        if name == 'f_kf_meth_f_1':
+            self.f_kf_meth_f_1 = value
+            return True
+
         if name == 'nat_staat':
             self.nat_staat = value
             return True
@@ -94,6 +107,12 @@
 
     def finish(self, master_loader):
 
+        if not self.f_kf_meth_c_1 is None \
+        or not self.f_kf_meth_f_1 is None:
+            if not self.f_kf_meth_f_1: value = f_kf_meth_f_1
+            else:                      value = f_kf_meth_c_1
+            master_loader.data.append(('f_kf_meth_f_1', value))
+
         if not self.nat_staat is None:
             nat_staat = decode_int(self.nat_staat)
             if master_loader.version < 2:



More information about the Mpuls-commits mailing list