[GRASS-SVN] r68120 - grass-addons/grass7/raster/r.forestfrag

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 23 02:14:19 PDT 2016


Author: pvanbosgeo
Date: 2016-03-23 02:14:19 -0700 (Wed, 23 Mar 2016)
New Revision: 68120

Modified:
   grass-addons/grass7/raster/r.forestfrag/r.forestfrag.py
Log:
r.forestfrag addon: small bugfix

Modified: grass-addons/grass7/raster/r.forestfrag/r.forestfrag.py
===================================================================
--- grass-addons/grass7/raster/r.forestfrag/r.forestfrag.py	2016-03-23 09:12:28 UTC (rev 68119)
+++ grass-addons/grass7/raster/r.forestfrag/r.forestfrag.py	2016-03-23 09:14:19 UTC (rev 68120)
@@ -376,7 +376,7 @@
     if flag_t:
         # pf layer
         fd7, tmphist = tempfile.mkstemp()
-        text_file = open(tmphist[1], "w")
+        text_file = open(tmphist, "w")
         text_file.write("created using:\n")
         text_file.write(desctxt + "\n")
         text_file.close()
@@ -406,7 +406,7 @@
                           source1="based on " + ipl,
                           source2="",
                           description="Probability neighbor of forest cell is forest",
-                          loadhistory=tmphist[1])
+                          loadhistory=tmphist)
         os.close(fd8)
         os.remove(tmphist)
 



More information about the grass-commit mailing list