[GRASS-SVN] r66995 - grass-addons/grass7/vector/v.in.natura2000

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 1 02:11:10 PST 2015


Author: hellik
Date: 2015-12-01 02:11:10 -0800 (Tue, 01 Dec 2015)
New Revision: 66995

Modified:
   grass-addons/grass7/vector/v.in.natura2000/v.in.natura2000.py
Log:
v.in.natura2000: try: import pyspatialite.dbapi2 as db

Modified: grass-addons/grass7/vector/v.in.natura2000/v.in.natura2000.py
===================================================================
--- grass-addons/grass7/vector/v.in.natura2000/v.in.natura2000.py	2015-12-01 08:49:42 UTC (rev 66994)
+++ grass-addons/grass7/vector/v.in.natura2000/v.in.natura2000.py	2015-12-01 10:11:10 UTC (rev 66995)
@@ -116,8 +116,11 @@
 import math
 import shutil
 import tempfile
-import pyspatialite.dbapi2 as db
 import grass.script as grass
+try:
+    import pyspatialite.dbapi2 as db
+except ImportError:
+    grass.warning( "pyspatialite has to be installed." )
 
 if not os.environ.has_key("GISBASE"):
     grass.message( "You must be in GRASS GIS to run this program." )



More information about the grass-commit mailing list