[GRASS-SVN] r66285 - grass-addons/grass7/raster/r.green/r.green.hydro/libhydro

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 22 05:13:55 PDT 2015


Author: Giulia
Date: 2015-09-22 05:13:55 -0700 (Tue, 22 Sep 2015)
New Revision: 66285

Modified:
   grass-addons/grass7/raster/r.green/r.green.hydro/libhydro/plant.py
Log:
r.green: temporary files as tmprgreen_PID

Modified: grass-addons/grass7/raster/r.green/r.green.hydro/libhydro/plant.py
===================================================================
--- grass-addons/grass7/raster/r.green/r.green.hydro/libhydro/plant.py	2015-09-22 12:13:10 UTC (rev 66284)
+++ grass-addons/grass7/raster/r.green/r.green.hydro/libhydro/plant.py	2015-09-22 12:13:55 UTC (rev 66285)
@@ -1,5 +1,6 @@
 # -*- coding: utf-8 -*-
 import random
+import os
 from collections import namedtuple
 
 import numpy as np
@@ -197,7 +198,8 @@
             remove = False
         else:
             # create a random name
-            contour = 'tmpvect%02d' % random.randint(0, 99)
+            contour = 'tmp_struct_contour_%05d_%03d' % (os.getpid(), 
+                                                        random.randint(0, 999))
             compute_contour = True
             remove = True
 



More information about the grass-commit mailing list