[GRASS-SVN] r60627 - grass/trunk/scripts/v.in.lines
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 31 02:39:21 PDT 2014
Author: hcho
Date: 2014-05-31 02:39:21 -0700 (Sat, 31 May 2014)
New Revision: 60627
Modified:
grass/trunk/scripts/v.in.lines/v.in.lines.py
Log:
v.in.lines: use grass.separator and allow multi-character separators
Modified: grass/trunk/scripts/v.in.lines/v.in.lines.py
===================================================================
--- grass/trunk/scripts/v.in.lines/v.in.lines.py 2014-05-31 09:36:29 UTC (rev 60626)
+++ grass/trunk/scripts/v.in.lines/v.in.lines.py 2014-05-31 09:39:21 UTC (rev 60627)
@@ -44,7 +44,7 @@
def main():
global tmp
- fs = options['separator']
+ fs = grass.separator(options['separator'])
threeD = flags['z']
prog = 'v.in.lines'
@@ -58,19 +58,6 @@
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
More information about the grass-commit
mailing list