[GRASS-SVN] r57257 - grass/trunk/scripts/v.unpack

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 23 14:06:07 PDT 2013


Author: martinl
Date: 2013-07-23 14:06:07 -0700 (Tue, 23 Jul 2013)
New Revision: 57257

Modified:
   grass/trunk/scripts/v.unpack/v.unpack.py
Log:
v.unpack: fix global var

Modified: grass/trunk/scripts/v.unpack/v.unpack.py
===================================================================
--- grass/trunk/scripts/v.unpack/v.unpack.py	2013-07-23 14:17:05 UTC (rev 57256)
+++ grass/trunk/scripts/v.unpack/v.unpack.py	2013-07-23 21:06:07 UTC (rev 57257)
@@ -49,15 +49,15 @@
 def main():
     infile = options['input']
     
-    # check if the input file exists
-    if not os.path.exists(infile):
-        grass.fatal(_("File <%s> not found") % infile)
-    
     # create temporary directory
     global tmp_dir
     tmp_dir = grass.tempdir()
     grass.debug('tmp_dir = %s' % tmp_dir)
     
+    # check if the input file exists
+    if not os.path.exists(infile):
+        grass.fatal(_("File <%s> not found") % infile)
+    
     # copy the files to tmp dir
     input_base = os.path.basename(infile)
     shutil.copyfile(infile, os.path.join(tmp_dir, input_base))



More information about the grass-commit mailing list