From 5c5e5b507e55ed2a2bd810ebcec6064ef06cb0f6 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 3 Apr 2021 12:39:01 +0100 Subject: [PATCH] monitor.py: Fix up legavy config.get() calls --- monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor.py b/monitor.py index 6ae6b372..ab205b9d 100644 --- a/monitor.py +++ b/monitor.py @@ -1157,14 +1157,14 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below oldfiles = sorted((x for x in listdir(config.get_str('outdir')) if regexp.match(x))) # type: ignore if oldfiles: try: - with open(join(config.get('outdir'), oldfiles[-1]), 'r', encoding='utf-8') as h: # type: ignore + with open(join(config.get_str('outdir'), oldfiles[-1]), 'r', encoding='utf-8') as h: # type: ignore if h.read() == string: return # same as last time - don't write except UnicodeError: logger.exception("UnicodeError reading old ship loadout with utf-8 encoding, trying without...") try: - with open(join(config.get('outdir'), oldfiles[-1]), 'r') as h: # type: ignore + with open(join(config.get_str('outdir'), oldfiles[-1]), 'r') as h: # type: ignore if h.read() == string: return # same as last time - don't write