Merge pull request #1606 from ericgeldmacher/fix_log_decoding_error

Fix decoding errors not handled when trying to read service logs
This commit is contained in:
Alexandre Aubin 2023-02-23 16:07:08 +01:00 committed by GitHub
commit c13d627302
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -775,7 +775,7 @@ def _tail(file, n):
f = gzip.open(file)
lines = f.read().splitlines()
else:
f = open(file)
f = open(file, errors='replace')
pos = 1
lines = []
while len(lines) < to_read and pos > 0: