From 653f901473999179db4b7c80fa8bac8ff9e1743d Mon Sep 17 00:00:00 2001 From: Quintin Date: Wed, 26 Feb 2025 14:06:52 -0800 Subject: [PATCH] Use new url attribute in process_complex --- wps_tools/io.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wps_tools/io.py b/wps_tools/io.py index 26bfd46..210fdfd 100644 --- a/wps_tools/io.py +++ b/wps_tools/io.py @@ -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