From 6d84307134f241dd7bff4562d768425bc9b40696 Mon Sep 17 00:00:00 2001 From: derrod Date: Tue, 2 Jun 2020 11:35:54 +0200 Subject: [PATCH] [core] Fix crash if EGL installation has been removed --- legendary/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/legendary/core.py b/legendary/core.py index c43fb68..5de8fec 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -54,9 +54,10 @@ class LegendaryCore: if os.name != 'nt': self.egl.programdata_path = self.lgd.config.get('Legendary', 'egl_programdata', fallback=None) if self.egl.programdata_path and not os.path.exists(self.egl.programdata_path): - self.log.error(f'Config EGL ProgramData path ("{self.egl.programdata_path}") is invalid! Please fix.') + self.log.error(f'Config EGL path ("{self.egl.programdata_path}") is invalid! Disabling sync...') self.egl.programdata_path = None - self.lgd.config.remove_option('Legendary', 'egl_programdata', fallback=None) + self.lgd.config.remove_option('Legendary', 'egl_programdata') + self.lgd.config.remove_option('Legendary', 'egl_sync') self.lgd.save_config() self.local_timezone = datetime.now().astimezone().tzinfo