Page MenuHomePhabricator

[electrum] Catch a potential LibUSB error during session close when jumping to bootloader
ClosedPublic

Authored by Fabien on Fri, Mar 21, 11:05.

Details

Summary

The issue exists some machines/OS/devices (still unclear) that libusb raises an error when the session is closed during a reboot to bootloader. Since this does not affect the upgrade process we can safely catch and ignore this error as a workaround.

Test Plan

Tested on a failing machine/os/device combination.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Fri, Mar 21, 11:05
PiRK added a subscriber: PiRK.
PiRK added inline comments.
electrum/electrumabc_plugins/trezor/clientbase.py
362–371 ↗(On Diff #53220)

for simple try: ... except SomeError: pass blocks I usually prefer with contexlib.suppress(SomeError): ...

But then the comment placement is less obvious.
Your call.

This revision is now accepted and ready to land.Fri, Mar 21, 11:21