[GRASS-SVN] r67926 - in grass-addons/grass7/raster/r.green/r.green.biomassfor: libforest r.green.biomassfor.financial

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 23 02:58:26 PST 2016


Author: Giulia
Date: 2016-02-23 02:58:26 -0800 (Tue, 23 Feb 2016)
New Revision: 67926

Modified:
   grass-addons/grass7/raster/r.green/r.green.biomassfor/libforest/financial.py
   grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.financial/r.green.biomassfor.financial.py
Log:
r.green: fix bug in find_file

Modified: grass-addons/grass7/raster/r.green/r.green.biomassfor/libforest/financial.py
===================================================================
--- grass-addons/grass7/raster/r.green/r.green.biomassfor/libforest/financial.py	2016-02-23 10:31:49 UTC (rev 67925)
+++ grass-addons/grass7/raster/r.green/r.green.biomassfor/libforest/financial.py	2016-02-23 10:58:26 UTC (rev 67926)
@@ -13,7 +13,7 @@
 #############################################################################
 #
 import os
-import grass.script.find_file as find_file
+from grass.script.core import find_file
 from grass.script.core import run_command
 from grass.pygrass.modules.shortcuts import raster as r
 

Modified: grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.financial/r.green.biomassfor.financial.py
===================================================================
--- grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.financial/r.green.biomassfor.financial.py	2016-02-23 10:31:49 UTC (rev 67925)
+++ grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.financial/r.green.biomassfor.financial.py	2016-02-23 10:58:26 UTC (rev 67926)
@@ -355,14 +355,15 @@
     # set python path to the shared r.green libraries
     set_path('r.green', 'libforest', '..')
     set_path('r.green', 'libgreen', os.path.join('..', '..'))
-
+    from libforest.harvesting import combination
+    from libforest.harvesting import slope_computation, yield_pix_process
     from libgreen.utils import cleanup
     from libgreen.utils import sel_columns
     #TODO: check the required column
     # from libgreen.checkparameter import check_required_columns,
     # exception2error
-    from libforest.financial import revenues, productivity, costs, net_revenues
-    from libforest.harvesting import combination, slope_computation, yield_pix_process
+    from libforest.financial import revenues, productivity
+    from libforest.financial import costs, net_revenues
 except ImportError:
     warning('libgreen and libforest not in the python path!')
 
@@ -423,7 +424,6 @@
             run_command("r.mapcalc", overwrite=True,
                         expression=('%s=%f' % (output, val)))
     # create combination maps to avoid if construction
-    import ipdb; ipdb.set_trace()
     m1t1, m1t2, m1, m2, not2 = combination('tmprgreen_%i_management' % pid,
                                            'tmprgreen_%i_treatment' % pid)
 



More information about the grass-commit mailing list