Skip to content

Commit

Permalink
revision is not int anymore (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
HuidaeCho committed Feb 26, 2020
1 parent 68c95a7 commit 0561ad6
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions grass7/raster/r.lfp/r.lfp.py
Expand Up @@ -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__":
Expand Down

0 comments on commit 0561ad6

Please sign in to comment.