[GRASS-SVN] r72773 - grass-addons/grass7/vector/v.class.mlR
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jun 6 00:01:57 PDT 2018
Author: mlennert
Date: 2018-06-06 00:01:57 -0700 (Wed, 06 Jun 2018)
New Revision: 72773
Modified:
grass-addons/grass7/vector/v.class.mlR/v.class.mlR.py
Log:
v.class.mlR: better handling of tempfile cleanup
Modified: grass-addons/grass7/vector/v.class.mlR/v.class.mlR.py
===================================================================
--- grass-addons/grass7/vector/v.class.mlR/v.class.mlR.py 2018-06-05 19:37:45 UTC (rev 72772)
+++ grass-addons/grass7/vector/v.class.mlR/v.class.mlR.py 2018-06-06 07:01:57 UTC (rev 72773)
@@ -233,9 +233,12 @@
gscript.try_remove(feature_vars)
if trainmap:
gscript.try_remove(training_vars)
- gscript.try_remove(model_output_csv)
- gscript.try_remove(model_output_csvt)
- gscript.try_remove(r_commands)
+ if model_output_csv:
+ gscript.try_remove(model_output_csv)
+ if model_output_csvt:
+ gscript.try_remove(model_output_csvt)
+ if r_commands:
+ gscript.try_remove(r_commands)
if reclass_files:
for reclass_file in reclass_files.itervalues():
gscript.try_remove(reclass_file)
@@ -258,7 +261,7 @@
global reclass_files
allmap = trainmap = feature_vars = training_vars = None
- model_output = model_output_desc = temptable = r_commands = None
+ model_output_csv = model_output_csvt = temptable = r_commands = None
reclass_files = None
voting_function = "voting <- function (x, w) {\n"
More information about the grass-commit
mailing list