[GRASS-SVN] r52444 - grass-addons/grass7/vector/v.pack

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 24 08:31:13 PDT 2012


Author: lucadelu
Date: 2012-07-24 08:31:12 -0700 (Tue, 24 Jul 2012)
New Revision: 52444

Modified:
   grass-addons/grass7/vector/v.pack/v.pack.py
Log:
fix bug about name with mapset

Modified: grass-addons/grass7/vector/v.pack/v.pack.py
===================================================================
--- grass-addons/grass7/vector/v.pack/v.pack.py	2012-07-24 12:52:02 UTC (rev 52443)
+++ grass-addons/grass7/vector/v.pack/v.pack.py	2012-07-24 15:31:12 UTC (rev 52444)
@@ -49,13 +49,13 @@
     gfile = grass.find_file(infile, element = 'vector')
     if not gfile['name']:
         grass.fatal(_("Vector map <%s> not found") % infile)
+    #split the name if there is the mapset name
+    if infile.find('@'):
+        infile = infile.split('@')[0]    
     #output name
     if options['output']:
         outfile = options['output']
     else:
-        #split the name if there is the mapset name
-        if infile.find('@'):
-            infile = infile.split('@')[0]
         outfile = infile + '.pack'
     #check if exists the output file
     if os.path.exists(outfile):



More information about the grass-commit mailing list