[Dive4elements-commits] [PATCH 3 of 3] Fix syntax error in next_id and remove obsolete oracle parameter

Wald Commits scm-commit at wald.intevation.org
Wed Mar 13 10:34:57 CET 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1363167269 -3600
# Node ID 9245f4b434b30550dbb9a1aad297bbb41b650637
# Parent  de4c12b02374e6716930dcff06084e20a1d72e97
Fix syntax error in next_id and remove obsolete oracle parameter

diff -r de4c12b02374 -r 9245f4b434b3 flys-backend/contrib/shpimporter/dgm.py
--- 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:


More information about the Dive4elements-commits mailing list