Skip to content

Commit

Permalink
r.maxent.train.py: fixes wrong handling of end of line character (#1264)
Browse files Browse the repository at this point in the history
This patch ensures a better cross-platform handling of end of line characters when creating a list of addons using g.extension.
  • Loading branch information
ecodiv authored Dec 14, 2024
1 parent dd5fa88 commit c71f135
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/raster/r.maxent.train/r.maxent.train.py
Original file line number Diff line number Diff line change
@@ -810,10 +810,9 @@ def main(options, flags):
# Get list with all files in the output folder
# -----------------------------------------------------------------
all_files = all_files = os.listdir(options["outputdirectory"])
# Check if v.db.pyupdate is installed
plugins_installed = gs.read_command(
"g.extension", flags="a", quiet=function_verbosity
).split("\n")
# Create list of addons. Is later used to check if v.db.pyupdate is installed
outputs = gs.read_command("g.extension", flags="a", quiet=function_verbosity)
plugins_installed = [addon.strip() for addon in outputs.splitlines()]

# -----------------------------------------------------------------
# Import sampleprediction files(s) grass gis

0 comments on commit c71f135

Please sign in to comment.