Skip to content

Commit befe25c

Browse files
author
rblazek
committedJun 16, 2009
reorganized grass python interface, patch by cgsbob
git-svn-id: http://svn.osgeo.org/qgis/trunk@10936 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 264d6e0 commit befe25c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎src/plugins/grass/scripts/qgis.db.connect-login.pg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@
7373
import os
7474
import string
7575
try:
76+
from grass.script import core as grass
77+
except ImportError:
7678
import grass
7779
except:
78-
raise Exception ("Cannot find 'grass' Python module. Python is supported by GRASS from version 6.4" )
80+
raise Exception ("Cannot find 'grass' Python module. Python is supported by GRASS from version >= 6.4" )
7981

8082
def main():
8183
host = options['host']

‎src/plugins/grass/scripts/qgis.v.out.ogr.pg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,11 @@
107107
import os
108108
import string
109109
try:
110+
from grass.script import core as grass
111+
except ImportError:
110112
import grass
111113
except:
112-
raise Exception ("Cannot find 'grass' Python module. Python is supported by GRASS from version 6.4" )
114+
raise Exception ("Cannot find 'grass' Python module. Python is supported by GRASS from version >= 6.4" )
113115

114116
def main():
115117
input = options['input']

0 commit comments

Comments
 (0)
Please sign in to comment.