Prechádzať zdrojové kódy

simplify variables

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40365 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 15 rokov pred
rodič
commit
1ad6761c65
1 zmenil súbory, kde vykonal 3 pridanie a 7 odobranie
  1. 3 7
      scripts/v.in.lines/v.in.lines.py

+ 3 - 7
scripts/v.in.lines/v.in.lines.py

@@ -58,15 +58,11 @@ def cleanup():
 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 @@ def main():
             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 @@ def main():
 
 
     grass.run_command('v.in.mapgen', flags = 'f' + do3D,
-                      input = runfile, output = output)
+                      input = runfile, output = options['output'])
 
 
 if __name__ == "__main__":