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

Dont crash when journal_dir is None

Ensures that journal_dir is always at least an empty string.

Fixes #639
This commit is contained in:
A_D 2020-07-27 18:55:59 +02:00 committed by GitHub
parent 6ba1f77352
commit 1b543e5820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,9 +118,14 @@ class EDLogs(FileSystemEventHandler):
def start(self, root):
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 = ''
logdir = expanduser(journal_dir) # type: ignore # config is weird
if not logdir or not isdir(logdir):
self.stop()
return False