1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 08:40:34 +03:00

Merge branch 'fix/639-crash-linux-unset-journal-dir' into develop

This commit is contained in:
Athanasius 2020-07-27 18:12:40 +01:00
commit b1d35e0579

View File

@ -124,9 +124,16 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
def start(self, root: 'tkinter.Tk'):
self.root = root
logdir = expanduser(config.get('journaldir') or config.default_journal_dir) # type: ignore # config is weird
journal_dir = config.get('journaldir') or config.default_journal_dir
if not logdir or not isdir(logdir): # type: ignore # config does weird things in its get
if journal_dir is None:
journal_dir = ''
# TODO(A_D): this is ignored for type checking due to all the different types config.get returns
# When that is refactored, remove the magic comment
logdir = expanduser(journal_dir) # type: ignore # config is weird
if not logdir or not isdir(logdir):
self.stop()
return False