Browse Source

getprivatekeys: try load_json if we did not get an address

283
ThomasV 9 years ago
parent
commit
7a1af24eda
  1. 8
      lib/commands.py

8
lib/commands.py

@ -272,10 +272,10 @@ class Commands:
@command('wp') @command('wp')
def getprivatekeys(self, address): def getprivatekeys(self, address):
"""Get private keys of addresses. You may pass a single wallet address, or a list of wallet addresses.""" """Get private keys of addresses. You may pass a single wallet address, or a list of wallet addresses."""
is_list = type(address) is list if is_address(address):
domain = address if is_list else [address] return self.wallet.get_private_key(address, self._password)
out = [self.wallet.get_private_key(address, self._password) for address in domain] domain = json_loads(address)
return out if is_list else out[0] return [self.wallet.get_private_key(address, self._password) for address in domain]
@command('w') @command('w')
def ismine(self, address): def ismine(self, address):

Loading…
Cancel
Save