From 3c56be7142c441a8b2b8b75aee82e237b252ff55 Mon Sep 17 00:00:00 2001 From: Panu Lahtinen Date: Thu, 19 Aug 2021 10:22:22 +0300 Subject: [PATCH] Use only 'path' portion of the URI --- bin/cat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cat.py b/bin/cat.py index 67de8a73..e3e29509 100755 --- a/bin/cat.py +++ b/bin/cat.py @@ -33,6 +33,7 @@ import tempfile from bz2 import BZ2File from datetime import datetime, timedelta +from urllib.parse import urlsplit from trollsift.parser import compose from posttroll.publisher import Publish @@ -131,7 +132,7 @@ def get_aliases(raw_config_str): def process_message(msg, config): """Process the message.""" pattern = config["output_file_pattern"] - input_files = [item["uri"] for item in msg.data["collection"]] + input_files = [urlsplit(item["uri"]).path for item in msg.data["collection"]] data = msg.data.copy() data["proc_time"] = datetime.utcnow()