summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-04-11 14:03:06 +0200
committermathieui <mathieui@mathieui.net>2021-04-11 16:33:53 +0200
commit93daf173244e44744f1e48982f5936beb296ae0b (patch)
treed2b06be3af23bd08e44f3ae9aa3732d3ae1c49d7
parent18b1d5ae72fdef99bf9bd102b45cd67e6865d6f5 (diff)
downloadpoezio-93daf173244e44744f1e48982f5936beb296ae0b.tar.gz
poezio-93daf173244e44744f1e48982f5936beb296ae0b.tar.bz2
poezio-93daf173244e44744f1e48982f5936beb296ae0b.tar.xz
poezio-93daf173244e44744f1e48982f5936beb296ae0b.zip
fix: logger: handle empty log files as well
-rw-r--r--poezio/logger.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/poezio/logger.py b/poezio/logger.py
index d30a78a3..e13db524 100644
--- a/poezio/logger.py
+++ b/poezio/logger.py
@@ -387,7 +387,7 @@ def iterate_messages_reverse(filepath: Path) -> Generator[LogDict, None, None]:
)
if lines:
yield lines[0]
- except OSError:
+ except (OSError, ValueError):
pass