mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-30 17:01:34 +00:00
fix #2524: add proper error message
This commit is contained in:
parent
828b0e5d70
commit
298461aee2
1 changed files with 2 additions and 0 deletions
|
@ -361,6 +361,8 @@ class Commands:
|
||||||
@command('wp')
|
@command('wp')
|
||||||
def importprivkey(self, privkey):
|
def importprivkey(self, privkey):
|
||||||
"""Import a private key. """
|
"""Import a private key. """
|
||||||
|
if not self.wallet.can_import_privkey():
|
||||||
|
return "Error: This type of wallet cannot import private keys. Try to create a new wallet with that key."
|
||||||
try:
|
try:
|
||||||
addr = self.wallet.import_key(privkey, self._password)
|
addr = self.wallet.import_key(privkey, self._password)
|
||||||
out = "Keypair imported: " + addr
|
out = "Keypair imported: " + addr
|
||||||
|
|
Loading…
Add table
Reference in a new issue