diff --git a/torba/torba/client/wallet.py b/torba/torba/client/wallet.py index d546cd33f..acc1d01b4 100644 --- a/torba/torba/client/wallet.py +++ b/torba/torba/client/wallet.py @@ -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()