Skip to content

Commit

Permalink
Merge pull request #95 from pnuu/bugfix-cat-uri
Browse files Browse the repository at this point in the history
Use only 'path' portion of the URI in `cat.py`
  • Loading branch information
mraspaud authored Aug 25, 2021
2 parents eb8a2b6 + 3c56be7 commit da27326
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit da27326

Please sign in to comment.