[GRASS-SVN] r69045 - grass-addons/grass7/vector/v.surf.icw
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jul 30 13:50:40 PDT 2016
Author: hamish
Date: 2016-07-30 13:50:40 -0700 (Sat, 30 Jul 2016)
New Revision: 69045
Modified:
grass-addons/grass7/vector/v.surf.icw/v.surf.icw.py
Log:
bigfix: .splitlines() on MS Windows inserts an extra blank list entry after each line, presumably due to double-handling of CRLF
Modified: grass-addons/grass7/vector/v.surf.icw/v.surf.icw.py
===================================================================
--- grass-addons/grass7/vector/v.surf.icw/v.surf.icw.py 2016-07-30 20:46:03 UTC (rev 69044)
+++ grass-addons/grass7/vector/v.surf.icw/v.surf.icw.py 2016-07-30 20:50:40 UTC (rev 69045)
@@ -210,6 +210,10 @@
output = '-', flags = 'r',
**addl_opts).splitlines()
+ # Needed to strip away empty entries from MS Windows newlines
+ # list() is needed for Python 3 compatibility
+ points_list = list(filter(None, points_list))
+
# convert into a 2D list, drop unneeded cat column
# to drop cat col, add this to the end of the line [:-1]
#fixme: how does this all react for 3D starting points?
More information about the grass-commit
mailing list