diff --git a/electrum/plugins/trustedcoin/trustedcoin.py b/electrum/plugins/trustedcoin/trustedcoin.py index 318868937..314bc2555 100644 --- a/electrum/plugins/trustedcoin/trustedcoin.py +++ b/electrum/plugins/trustedcoin/trustedcoin.py @@ -537,7 +537,7 @@ class TrustedCoinPlugin(BasePlugin): def make_seed(self, seed_type): if not is_any_2fa_seed_type(seed_type): - raise Exception(f'unexpected seed type: {seed_type}') + raise Exception(f'unexpected seed type: {seed_type!r}') return Mnemonic('english').make_seed(seed_type=seed_type) @hook @@ -557,7 +557,7 @@ class TrustedCoinPlugin(BasePlugin): def xkeys_from_seed(self, seed, passphrase): t = seed_type(seed) if not is_any_2fa_seed_type(t): - raise Exception(f'unexpected seed type: {t}') + raise Exception(f'unexpected seed type: {t!r}') words = seed.split() n = len(words) if t == '2fa': @@ -578,7 +578,7 @@ class TrustedCoinPlugin(BasePlugin): xprv1, xpub1 = self.get_xkeys(seed, t, passphrase, "m/0'/") xprv2, xpub2 = self.get_xkeys(seed, t, passphrase, "m/1'/") else: - raise Exception(f'unexpected seed type: {t}') + raise Exception(f'unexpected seed type: {t!r}') return xprv1, xpub1, xprv2, xpub2 @hook diff --git a/electrum/version.py b/electrum/version.py index ca2deaff7..f37cc9d14 100644 --- a/electrum/version.py +++ b/electrum/version.py @@ -19,4 +19,4 @@ def seed_prefix(seed_type): return SEED_PREFIX_2FA elif seed_type == '2fa_segwit': return SEED_PREFIX_2FA_SW - raise Exception(f"unknown seed_type: {seed_type}") + raise Exception(f"unknown seed_type: {seed_type!r}") diff --git a/electrum/wizard.py b/electrum/wizard.py index 1cab5ac3c..7b6dd46f7 100644 --- a/electrum/wizard.py +++ b/electrum/wizard.py @@ -521,7 +521,7 @@ class NewWalletWizard(AbstractWizard): elif wallet_type == 'multisig' and seed_type not in ['standard', 'segwit', 'bip39', 'slip39']: seed_valid = False - self._logger.debug(f'seed verified: {seed_valid}, type={seed_type}, validation_message={validation_message}') + self._logger.debug(f'seed verified: {seed_valid}, type={seed_type!r}, validation_message={validation_message}') return seed_valid, seed_type, validation_message, can_passphrase