[GRASS-SVN] r40365 - grass/trunk/scripts/v.in.lines

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jan 10 14:28:43 EST 2010


Author: hamish
Date: 2010-01-10 14:28:43 -0500 (Sun, 10 Jan 2010)
New Revision: 40365

Modified:
   grass/trunk/scripts/v.in.lines/v.in.lines.py
Log:
simplify variables

Modified: grass/trunk/scripts/v.in.lines/v.in.lines.py
===================================================================
--- grass/trunk/scripts/v.in.lines/v.in.lines.py	2010-01-10 19:24:27 UTC (rev 40364)
+++ grass/trunk/scripts/v.in.lines/v.in.lines.py	2010-01-10 19:28:43 UTC (rev 40365)
@@ -58,15 +58,11 @@
 def main():
     global tmp
 
-    infile_opt = options['input']
-    output = options['output']
     fs = options['fs']
     threeD = flags['z']
 
     prog = 'v.in.lines'
 
-    opts = ""
-
     if threeD:
         do3D = 'z'
     else:
@@ -90,11 +86,11 @@
             grass.fatal(_("Invalid field separator '%s'") % fs)
 
     #### set up input file
-    if infile_opt == '-':
+    if options['input'] == '-':
         infile = None
         inf = sys.stdin
     else:
-        infile = infile_opt
+        infile = options['input']
         if not os.path.exists(infile):
             grass.fatal(_("Unable to read input file <%s>") % infile)
         grass.debug("input file=[%s]" % infile)
@@ -141,7 +137,7 @@
 
 
     grass.run_command('v.in.mapgen', flags = 'f' + do3D,
-                      input = runfile, output = output)
+                      input = runfile, output = options['output'])
 
 
 if __name__ == "__main__":



More information about the grass-commit mailing list