diff flys-backend/contrib/shpimporter/axis.py @ 5004:f1c01fecf194 dami

Fix imports of ogr, this removes a warning in gdal 1.9 but keeps compatibility with older versions
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 15 Feb 2013 16:18:34 +0100
parents 23a090b41543
children c5187ab9f571
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/axis.py	Fri Feb 15 15:03:48 2013 +0100
+++ b/flys-backend/contrib/shpimporter/axis.py	Fri Feb 15 16:18:34 2013 +0100
@@ -1,7 +1,9 @@
-import ogr
+try:
+    from osgeo import ogr
+except ImportErrror:
+    import ogr
 
 from importer import Importer
-import shpimporter
 
 NAME="Axis"
 TABLE_NAME="river_axes"

http://dive4elements.wald.intevation.org