[GRASS-SVN] r70947 - grass-addons/grass7/vector/v.lfp
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Apr 25 01:40:47 PDT 2017
Author: hcho
Date: 2017-04-25 01:40:47 -0700 (Tue, 25 Apr 2017)
New Revision: 70947
Modified:
grass-addons/grass7/vector/v.lfp/v.lfp.py
Log:
v.lfp: Use libgis_revision when revision is not available
Modified: grass-addons/grass7/vector/v.lfp/v.lfp.py
===================================================================
--- grass-addons/grass7/vector/v.lfp/v.lfp.py 2017-04-25 04:55:40 UTC (rev 70946)
+++ grass-addons/grass7/vector/v.lfp/v.lfp.py 2017-04-25 08:40:47 UTC (rev 70947)
@@ -171,7 +171,17 @@
grass.fatal(_("Cannot flip the longest flow path"))
# write history if supported
- if int(grass.version()["revision"][1:]) >= 70740:
+ version = grass.version()
+ if version["revision"] != "exported":
+ # the revision number is available
+ version = int(version["revision"][1:])
+ else:
+ # some binary distributions don't build from the SVN repository and
+ # revision is not available; use the libgis revision as a fallback in
+ # this case
+ version = int(version["libgis_revision"])
+
+ if version >= 70740:
# v.support -h added in r70740
grass.run_command("v.support", flags="h", map=output,
cmdhist=os.environ["CMDLINE"])
More information about the grass-commit
mailing list