diff flys-backend/contrib/shpimporter/boundaries.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 5a0225ddae2b
children c5187ab9f571
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/boundaries.py	Fri Feb 15 15:03:48 2013 +0100
+++ b/flys-backend/contrib/shpimporter/boundaries.py	Fri Feb 15 16:18:34 2013 +0100
@@ -1,4 +1,7 @@
-import ogr
+try:
+    from osgeo import ogr
+except ImportErrror:
+    import ogr
 
 from importer import Importer
 

http://dive4elements.wald.intevation.org