diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-06-18 09:17:11 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-06-18 09:17:20 +0200 |
commit | 5a514c35bcff262c1759a29e21678d0cd79bd92e (patch) | |
tree | 6fac46086f257e8374b9c7fba589ebb32b32a85e | |
parent | 5694d1078172822caa8f43c1f535e7a9e423b8e3 (diff) | |
parent | 7ad720d89020837ba1831055d8ee4eb955075f89 (diff) |
Merge pull request #4354
7ad720d Added encryptwallet call to bitrpc.py (dllud)
-rw-r--r-- | contrib/bitrpc/bitrpc.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/bitrpc/bitrpc.py b/contrib/bitrpc/bitrpc.py index a84d7e34dd..02577b1b6a 100644 --- a/contrib/bitrpc/bitrpc.py +++ b/contrib/bitrpc/bitrpc.py @@ -22,6 +22,18 @@ if cmd == "backupwallet": print access.backupwallet(path) except: print "\n---An error occurred---\n" + +elif cmd == "encryptwallet": + try: + pwd = getpass.getpass(prompt="Enter passphrase: ") + pwd2 = getpass.getpass(prompt="Repeat passphrase: ") + if pwd == pwd2: + access.encryptwallet(pwd) + print "\n---Wallet encrypted. Server stopping, restart to run with encrypted wallet---\n" + else: + print "\n---Passphrases do not match---\n" + except: + print "\n---An error occurred---\n" elif cmd == "getaccount": try: |