Skip to content

Commit

Permalink
Use new url attribute in process_complex
Browse files Browse the repository at this point in the history
  • Loading branch information
QSparks committed Feb 26, 2025
1 parent 11646c1 commit 653f901
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wps_tools/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ def process_complex(input):
if "csv" in vars(input)["identifier"]:
return input.stream

elif "_url" in vars(input).keys() and vars(input)["_url"] != None:
return url_handler(workdir, input.url)
# Check for a remote URL: try the new 'url' attribute, falling back to the legacy '_url'
url_val = getattr(input, "url", None) or getattr(input, "_url", None)
if url_val is not None:
return url_handler(workdir, url_val)

elif os.path.isfile(input.file):
return input.file
Expand Down

0 comments on commit 653f901

Please sign in to comment.