From 3814f9ebb9eba2f4607f3674ec8a9bf7936188e9 Mon Sep 17 00:00:00 2001 From: A_D Date: Thu, 20 Jan 2022 23:20:10 +0200 Subject: [PATCH] Quick fix to a type warning --- plugins/eddn.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/eddn.py b/plugins/eddn.py index 37165ea1..f16c571e 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -168,6 +168,10 @@ class EDDN: def flush(self): """Flush the replay file, clearing any data currently there that is not in the replaylog list.""" + if self.replayfile is None: + logger.warning('replayfile is None!') + return + self.replayfile.seek(0, SEEK_SET) self.replayfile.truncate() for line in self.replaylog: