fix wallet directory not being created
This commit is contained in:
parent
bdf6887791
commit
ca9d48d574
2 changed files with 6 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue