mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-16 02:42:40 +03:00
Merge pull request #640 from EDCD/fix/639-crash-linux-unset-journal-dir
Dont crash when journal_dir is None
This commit is contained in:
1 file changed
+9
-2
+9
-2
@@ -118,9 +118,16 @@ 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 = ''
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
Reference in new issue
Block a user