Browse Source

v.in.lines: use grass.separator and allow multi-character separators

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60627 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 11 years ago
parent
commit
47d082d75a
1 changed files with 1 additions and 14 deletions
  1. 1 14
      scripts/v.in.lines/v.in.lines.py

+ 1 - 14
scripts/v.in.lines/v.in.lines.py

@@ -44,7 +44,7 @@ def cleanup():
 def main():
     global tmp
 
-    fs = options['separator']
+    fs = grass.separator(options['separator'])
     threeD = flags['z']
 
     prog = 'v.in.lines'
@@ -58,19 +58,6 @@ def main():
     tmp = grass.tempfile()
 
 
-    #### parse field separator
-    if fs in ('space', 'tab'):
-        fs = ' '
-    elif fs == 'comma':
-        fs = ','
-    else:
-        if len(fs) > 1:
-            grass.warning(_("Invalid field separator, using '%s'") % fs[0])
-        try:
-            fs = fs[0]
-        except IndexError:
-            grass.fatal(_("Invalid field separator '%s'") % fs)
-
     #### set up input file
     if options['input'] == '-':
         infile = None