electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 967abcb359fa416879fe1a0cab7578babe3856d0
parent f4ac4783698267de82788bd2675eed6fbd71550a
Author: thomasv <thomasv@gitorious>
Date:   Wed, 27 Feb 2013 10:36:52 +0100

simplify dumpprivkeys

Diffstat:
Melectrum | 3---
Mlib/commands.py | 4+++-
2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/electrum b/electrum @@ -372,9 +372,6 @@ if __name__ == '__main__': elif cmd == 'createrawtransaction': args = [ cmd, ast.literal_eval(args[1]), ast.literal_eval(args[2])] - elif cmd == 'dumpprivkeys': - args = [cmd, wallet.all_addresses() if options.show_all else wallet.addresses + wallet.imported_keys.keys() ] - elif cmd=='addresses': args = [cmd, options.show_all] diff --git a/lib/commands.py b/lib/commands.py @@ -216,7 +216,9 @@ class Commands: def dumpprivkey(self, addr): return self.wallet.get_private_key(addr, self.password) - def dumpprivkeys(self, addresses): + def dumpprivkeys(self, addresses = None): + if addresses is None: + addresses = self.wallet.all_addresses() return self.wallet.get_private_keys(addresses, self.password) def validateaddress(self,addr):