[GRASS-dev] Re: [GRASS-user] Error while creating vectorial file
in WinGRASS
Hamish
hamish_b at yahoo.com
Wed Aug 4 07:25:44 EDT 2010
Martin wrote:
> >> db.execute (and v.db.connect) is called only when user asks
> >> for creating attribute table in the dialog (checkbox)
Hamish:
> > ok, so the checkbox should run 'db.connect -p' and see if a DB exists,
> > if it doesn't create one.
> >
> > proposal: add a new 'db.connect -d' flag to (re)set up the connection
> > to the default (like g.region has) to make this easier.
Martin:
> done in r42993. After review could be backported to devbr6.
oops, I totally overlooked the existing -c flag.
(nothing wrong with the new -d flag, but not as much need to backport it)
for 6.4 I think the solution is to have the 'create new vector map' in
wxgui (with the create-table checkbox enabled) do the python equivalent of:
DB=`db.connect -p | grep '^driver:' | cut -f2 -d:`
if [ -z "$DB" ] ; then
db.connect -c
fi
cheers,
Hamish
More information about the grass-dev
mailing list