Skip to content

Commit cfc1a54

Browse files
logmessaged: handle interrupted rollover (#28572)
old-commit-hash: 8704c1f
1 parent 4739f5e commit cfc1a54

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

system/logmessaged.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ def main() -> NoReturn:
4545
finally:
4646
sock.close()
4747
ctx.term()
48-
log_handler.close()
48+
49+
# can hit this if interrupted during a rollover
50+
try:
51+
log_handler.close()
52+
except ValueError:
53+
pass
4954

5055
if __name__ == "__main__":
5156
main()

0 commit comments

Comments
 (0)