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
remotes/1472528401135870657/master
hcho 2016-04-10 11:44:28 +00:00
parent 23ed5ff762
commit 2948f54eaf
1 changed files with 2 additions and 1 deletions

View File

@ -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:])