From 0561ad66feb3006b53c89b2fc7b8adc1123b8fb5 Mon Sep 17 00:00:00 2001 From: Huidae Cho Date: Wed, 26 Feb 2020 08:17:50 -0500 Subject: [PATCH] revision is not int anymore (#100) --- grass7/raster/r.lfp/r.lfp.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/grass7/raster/r.lfp/r.lfp.py b/grass7/raster/r.lfp/r.lfp.py index ace769a324..d1da9ab3b0 100755 --- a/grass7/raster/r.lfp/r.lfp.py +++ b/grass7/raster/r.lfp/r.lfp.py @@ -297,21 +297,12 @@ def calculate_lfp(input, output, idcol, id, coords, outlet, layer, outletidcol): grass.run_command("g.remove", flags="f", type="raster,vector", pattern="%s*" % prefix) - # write history if supported - 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: + try: # v.support -h added in r70740 grass.run_command("v.support", flags="h", map=output, cmdhist=os.environ["CMDLINE"]) + except CalledModuleError: + pass if __name__ == "__main__":