changeset 5267:9245f4b434b3

Fix syntax error in next_id and remove obsolete oracle parameter
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 13 Mar 2013 10:34:29 +0100
parents de4c12b02374
children df7028d0cb93
files flys-backend/contrib/shpimporter/dgm.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/dgm.py	Wed Mar 13 10:33:46 2013 +0100
+++ b/flys-backend/contrib/shpimporter/dgm.py	Wed Mar 13 10:34:29 2013 +0100
@@ -58,10 +58,10 @@
 
 
 NEXT_IDS = {}
-def next_id(cur, relation, oracle):
+def next_id(cur, relation):
     idx = NEXT_IDS.get(relation)
     if idx is None:
-            cur.execute(SQL_NEXT_ID % relation)
+        cur.execute(SQL_NEXT_ID % relation)
         idx = cur.fetchone()[0]
     NEXT_IDS[relation] = idx + 1
     return idx
@@ -73,7 +73,7 @@
         cur.execute(SQL_SELECT_RANGE_ID, (river_id, a, b))
     row = cur.fetchone()
     if row: return row[0]
-    idx = next_id(cur, "ranges", oracle)
+    idx = next_id(cur, "ranges")
     if oracle:
         cur.execute(SQL_INSERT_RANGE_ID_ORA, (idx, river_id, a, b))
     else:
@@ -90,7 +90,7 @@
         cur.execute(SQL_SELECT_TIME_ID, (a, b))
     row = cur.fetchone()
     if row: return row[0]
-    idx = next_id(cur, "time_intervals", oracle)
+    idx = next_id(cur, "time_intervals")
     if oracle:
         cur.execute(SQL_INSERT_TIME_ID_ORA, (idx, a, b))
     else:

http://dive4elements.wald.intevation.org