[GRASS-SVN] r69320 - grass-addons/grass7/raster/r.viewshed.cva

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 31 06:16:27 PDT 2016


Author: annakrat
Date: 2016-08-31 06:16:27 -0700 (Wed, 31 Aug 2016)
New Revision: 69320

Modified:
   grass-addons/grass7/raster/r.viewshed.cva/r.viewshed.cva.py
Log:
r.viewshed.cva: fix line splitting on Windows

Modified: grass-addons/grass7/raster/r.viewshed.cva/r.viewshed.cva.py
===================================================================
--- grass-addons/grass7/raster/r.viewshed.cva/r.viewshed.cva.py	2016-08-31 11:45:57 UTC (rev 69319)
+++ grass-addons/grass7/raster/r.viewshed.cva/r.viewshed.cva.py	2016-08-31 13:16:27 UTC (rev 69320)
@@ -144,8 +144,8 @@
     grass.message(_("Note that the routine is constrained to points in the current geographic region."))
     #read the coordinates, and parse them up.
     masterlist = []
-    for line in output_points.split(os.linesep):
-        masterlist.append(line.split(','))
+    for line in output_points.splitlines():
+        masterlist.append(line.strip().split(','))
     #now, loop through the master list and run r.viewshed for each of the sites, and append the viewsheds to a list (so we can work with them later)
     vshed_list = []
     for site in masterlist:



More information about the grass-commit mailing list