mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Pass errors='replace' to open command
This is to handle decoding errors described in YunoHost/issues#2156
This commit is contained in:
parent
bab27014d9
commit
bef4809f94
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue