forked from LBRYCommunity/lbry-sdk
use an assert to check password
This commit is contained in:
parent
180035296e
commit
81ddf7e1d2
1 changed files with 1 additions and 2 deletions
|
@ -238,8 +238,7 @@ class Wallet:
|
|||
|
||||
def encrypt(self, password):
|
||||
assert not self.is_locked, "Cannot re-encrypt a locked wallet, unlock first."
|
||||
if not password:
|
||||
raise ValueError("Cannot encrypt with blank password.")
|
||||
assert password, "Cannot encrypt with blank password."
|
||||
self.encryption_password = password
|
||||
self.preferences[ENCRYPT_ON_DISK] = True
|
||||
self.save()
|
||||
|
|
Loading…
Reference in a new issue