[GRASS-SVN] r70908 - grass-addons/grass7/vector/v.lfp

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Apr 21 05:18:04 PDT 2017


Author: hcho
Date: 2017-04-21 05:18:04 -0700 (Fri, 21 Apr 2017)
New Revision: 70908

Modified:
   grass-addons/grass7/vector/v.lfp/v.lfp.py
Log:
v.lfp: Write history only if it's supported (>=r70740)

Modified: grass-addons/grass7/vector/v.lfp/v.lfp.py
===================================================================
--- grass-addons/grass7/vector/v.lfp/v.lfp.py	2017-04-20 16:43:46 UTC (rev 70907)
+++ grass-addons/grass7/vector/v.lfp/v.lfp.py	2017-04-21 12:18:04 UTC (rev 70908)
@@ -170,9 +170,11 @@
             except CalledModuleError:
                 grass.fatal(_("Cannot flip the longest flow path"))
 
-    # write history
-    grass.run_command("v.support", flags="h", map=output,
-                      cmdhist=os.environ["CMDLINE"])
+    # write history if supported
+    if int(grass.version()["revision"][1:]) >= 70740:
+        # v.support -h added in r70740
+        grass.run_command("v.support", flags="h", map=output,
+                          cmdhist=os.environ["CMDLINE"])
 
 
 if __name__ == "__main__":



More information about the grass-commit mailing list