mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 07:47:14 +03:00
Empty journal dir workaround
This commit is contained in:
parent
e3def21683
commit
1e56f0046e
@ -728,8 +728,12 @@ def journal_entry( # noqa: C901
|
||||
this.commodities = this.outfitting = this.shipyard = None
|
||||
this.marketId = entry['MarketID']
|
||||
|
||||
path = pathlib.Path(config.get_str('journaldir', default=str(
|
||||
config.default_journal_dir))) / f'{entry["event"]}.json'
|
||||
journaldir = config.get_str('journaldir')
|
||||
if journaldir is None or journaldir == '':
|
||||
journaldir = str(config.default_journal_dir)
|
||||
|
||||
path = pathlib.Path(journaldir) / f'{entry["event"]}.json'
|
||||
|
||||
with path.open('rb') as f:
|
||||
entry = json.load(f)
|
||||
if entry['event'] == 'Market':
|
||||
|
6
prefs.py
6
prefs.py
@ -409,7 +409,11 @@ class PreferencesDialog(tk.Toplevel):
|
||||
|
||||
self.logdir = tk.StringVar()
|
||||
default = str(config.default_journal_dir) if config.default_journal_dir is not None else ''
|
||||
self.logdir.set(str(config.get_str('journaldir', default=default)))
|
||||
logdir = config.get_str('journaldir')
|
||||
if logdir is None or logdir == '':
|
||||
logdir = default
|
||||
|
||||
self.logdir.set(logdir)
|
||||
self.logdir_entry = nb.Entry(config_frame, takefocus=False)
|
||||
|
||||
# Location of the new Journal file in E:D 2.2
|
||||
|
Loading…
x
Reference in New Issue
Block a user