Browse Source

v.report: Don't print extra newlines for vectors with no db links

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68240 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 9 years ago
parent
commit
c9220ab8e7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      scripts/v.report/v.report.py

+ 2 - 1
scripts/v.report/v.report.py

@@ -145,11 +145,12 @@ def main():
 
         #make pre-table
         p = grass.pipe_command('v.to.db', flags = 'p',
+                               quiet = True,
                                map = mapname, option = option, columns = columns,
                                layer = layer, units = unitsp)
         records3 = []
         for line in p.stdout:
-            fields = line.split('|')
+            fields = line.rstrip('\r\n').split('|')
             if fields[0] in ['cat', '-1', '0']:
                 continue
             records3.append([int(fields[0])] + fields[1:])