From ca9d48d57432cb90be821d950310ab41d1d25d05 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 28 Sep 2018 17:02:04 -0400 Subject: [PATCH] fix wallet directory not being created --- lbrynet/conf.py | 4 ++++ lbrynet/daemon/Components.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/lbrynet/conf.py b/lbrynet/conf.py index 10d486b95..801fe3998 100644 --- a/lbrynet/conf.py +++ b/lbrynet/conf.py @@ -567,6 +567,10 @@ class Config: os.makedirs(self['data_dir']) return self['data_dir'] + def ensure_wallet_dir(self): + if not os.path.isdir(self['lbryum_wallet_dir']): + os.makedirs(self['lbryum_wallet_dir']) + def get_log_filename(self): """ Return the log file for this platform. diff --git a/lbrynet/daemon/Components.py b/lbrynet/daemon/Components.py index d3de4e528..9028a55a4 100644 --- a/lbrynet/daemon/Components.py +++ b/lbrynet/daemon/Components.py @@ -290,6 +290,7 @@ class HeadersComponent(Component): @defer.inlineCallbacks def start(self): + conf.settings.ensure_wallet_dir() if not os.path.exists(self.headers_dir): os.mkdir(self.headers_dir) if os.path.exists(self.old_file): @@ -336,6 +337,7 @@ class WalletComponent(Component): @defer.inlineCallbacks def start(self): + conf.settings.ensure_wallet_dir() log.info("Starting torba wallet") storage = self.component_manager.get_component(DATABASE_COMPONENT) lbryschema.BLOCKCHAIN_NAME = conf.settings['blockchain_name']