pytroll / pytroll-collectors

Collector modules for Pytroll
GNU General Public License v3.0
3 stars 18 forks source link

Use only 'path' portion of the URI in `cat.py` #95

Closed pnuu closed 3 years ago

pnuu commented 3 years ago

The current messaging from Trollmoves includes the protocol (ssh://, ftp:// or file://) and the network location (foo.bar.com) in the URIs within the message data. This causes cat.py to crash with

[ERROR: 2021-08-19 05:19:00 : cat] b"Cannot open file 'ssh://sat7-io.fmi.fi/lustre/tmp/data/oper/avhrr/ears/level0/AVHR_HRP_00_M03_20210819012800Z_20210819012900Z_N_O_20210819013127Z' mode r"

and ends up writing an empty file, sending a message with the written file, which in turn causes AAPP to crash.

This PR ensures that only the file path portion of the URI is used in cat.py.

codecov[bot] commented 3 years ago

Codecov Report

Merging #95 (3c56be7) into main (e6e95b0) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #95   +/-   ##
=======================================
  Coverage   83.33%   83.33%           
=======================================
  Files          19       19           
  Lines        2622     2622           
=======================================
  Hits         2185     2185           
  Misses        437      437           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e6e95b0...3c56be7. Read the comment docs.