From 0c9c6c270519e8be4dc0e30b2ed37a4184d41513 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Thu, 23 Aug 2018 02:55:17 -0400 Subject: [PATCH] create wallet directory if it doesnt exist --- lbrynet/wallet/manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lbrynet/wallet/manager.py b/lbrynet/wallet/manager.py index e9719c345..c912123b9 100644 --- a/lbrynet/wallet/manager.py +++ b/lbrynet/wallet/manager.py @@ -132,7 +132,11 @@ class LbryWalletManager(BaseWalletManager): #'db': db } - wallet_file_path = os.path.join(settings['lbryum_wallet_dir'], 'wallets', 'default_wallet') + wallets_directory = os.path.join(settings['lbryum_wallet_dir'], 'wallets') + if not os.path.exists(wallets_directory): + os.mkdir(wallets_directory) + + wallet_file_path = os.path.join(wallets_directory, 'default_wallet') cls.migrate_lbryum_to_torba(wallet_file_path)