[GRASS-SVN] r57123 - grass/trunk/scripts/v.pack
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jul 14 09:11:39 PDT 2013
Author: martinl
Date: 2013-07-14 09:11:38 -0700 (Sun, 14 Jul 2013)
New Revision: 57123
Modified:
grass/trunk/scripts/v.pack/v.pack.py
Log:
v.pack: fix global var usage
Modified: grass/trunk/scripts/v.pack/v.pack.py
===================================================================
--- grass/trunk/scripts/v.pack/v.pack.py 2013-07-14 16:07:27 UTC (rev 57122)
+++ grass/trunk/scripts/v.pack/v.pack.py 2013-07-14 16:11:38 UTC (rev 57123)
@@ -47,6 +47,9 @@
infile = options['input']
compression_off = flags['c']
+ global basedir
+ basedir = grass.tempdir()
+
# check if vector map exists
gfile = grass.find_file(infile, element = 'vector')
if not gfile['name']:
@@ -77,9 +80,7 @@
# prepare for packing
grass.verbose(_("Packing <%s>...") % (gfile['fullname']))
- global basedir
- basedir = grass.tempdir()
-
+
# write tar file, optional compression
if compression_off:
tar = tarfile.open(name = outfile, mode = 'w:')
More information about the grass-commit
mailing list