• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-cli / 11343896716

15 Oct 2024 10:09AM CUT coverage: 88.64%. Remained the same
11343896716

push

github

Uxio0
Bump flake8 from 7.1.0 to 7.1.1

Bumps [flake8](https://github.com/pycqa/flake8) from 7.1.0 to 7.1.1.
- [Commits](https://github.com/pycqa/flake8/compare/7.1.0...7.1.1)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

221 of 262 branches covered (84.35%)

Branch coverage included in aggregate %.

2869 of 3224 relevant lines covered (88.99%)

3.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.96
/src/safe_cli/operators/hw_wallets/trezor_exceptions.py
1
import functools
4✔
2

3
from trezorlib.exceptions import (
4✔
4
    Cancelled,
5
    OutdatedFirmwareError,
6
    PinException,
7
    TrezorFailure,
8
)
9
from trezorlib.transport import TransportException
4✔
10

11
from ..exceptions import HardwareWalletException
4✔
12
from .exceptions import InvalidDerivationPath
4✔
13

14

15
def raise_trezor_exception_as_hw_wallet_exception(function):
4✔
16
    @functools.wraps(function)
4✔
17
    def wrapper(*args, **kwargs):
4✔
18
        try:
4✔
19
            return function(*args, **kwargs)
4✔
20
        except TrezorFailure as e:
4✔
21
            raise HardwareWalletException(e.message)
×
22
        except OutdatedFirmwareError:
4✔
23
            raise HardwareWalletException("Trezor firmware version is not supported")
4✔
24
        except PinException:
4✔
25
            raise HardwareWalletException("Wrong PIN")
4✔
26
        except Cancelled:
4✔
27
            raise HardwareWalletException("Trezor operation was cancelled")
4✔
28
        except TransportException:
4✔
29
            raise HardwareWalletException("Trezor device is not connected")
4✔
30
        except InvalidDerivationPath as e:
×
31
            raise HardwareWalletException(e.message)
×
32

33
    return wrapper
4✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc