tcreate dir if it does not exist - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 99a269fcf5977f519bab9dc9faf72fc7724ee3aa
DIR parent f0d0dc8acda51ce89fd966842cc44f7dc971ea52
HTML Author: ThomasV <thomasv@gitorious>
Date: Sat, 5 Nov 2011 20:15:17 +0100
create dir if it does not exist
Diffstat:
M client/electrum.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
DIR diff --git a/client/electrum.py b/client/electrum.py
t@@ -217,7 +217,10 @@ def raw_tx( inputs, outputs, for_sig = None ):
class InvalidPassword(Exception):
pass
-wallet_path = os.environ["HOME"] + '/.bitcoin/electrum.dat'
+wallet_dir = os.environ["HOME"] + '/.bitcoin/'
+if not os.path.exists( wallet_dir ):
+ os.mkdir( wallet_dir )
+wallet_path = wallet_dir + '/electrum.dat'
class Wallet:
def __init__(self):