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

safe-global / safe-cli / 7960883981

19 Feb 2024 02:12PM UTC coverage: 95.146%. Remained the same
7960883981

push

github

Uxio0
Bump pytest from 8.0.0 to 8.0.1

Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.0.0...8.0.1)

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

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

2156 of 2266 relevant lines covered (95.15%)

3.76 hits per line

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

95.83
/safe_cli/operators/hw_wallets/ledger_exceptions.py
1
import functools
4✔
2

3
from ledgereth.exceptions import (
4✔
4
    LedgerAppNotOpened,
5
    LedgerCancel,
6
    LedgerLocked,
7
    LedgerNotFound,
8
)
9

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

13

14
def raise_ledger_exception_as_hw_wallet_exception(function):
4✔
15
    @functools.wraps(function)
4✔
16
    def wrapper(*args, **kwargs):
4✔
17
        try:
4✔
18
            return function(*args, **kwargs)
4✔
19
        except LedgerNotFound as e:
4✔
20
            raise HardwareWalletException(e.message)
4✔
21
        except LedgerLocked as e:
4✔
22
            raise HardwareWalletException(e.message)
4✔
23
        except LedgerAppNotOpened as e:
4✔
24
            raise HardwareWalletException(e.message)
4✔
25
        except LedgerCancel as e:
4✔
26
            raise HardwareWalletException(e.message)
4✔
27
        except InvalidDerivationPath as e:
4✔
28
            raise HardwareWalletException(e.message)
4✔
29
        except BaseException as e:
4✔
30
            if "Error while writing" in e.args:
4✔
31
                raise HardwareWalletException("Ledger error writting, restart safe-cli")
×
32
            raise e
4✔
33

34
    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