1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 13:38:12 +00:00
Commit Graph

19 Commits

Author SHA1 Message Date
matejcik
88988172b9 bridge: perform HTTP request in read, not write
This allows us to return early from a `write`, which we need in cases
where we want to perform an operation inbetween `read` and `write` -
namely, callback for ButtonRequest should technically be invoked after
returning ButtonAck but before waiting for device's response.

Of course that doesn't really work. The callback will actually be
invoked _before_ ButtonAck, so there's still the condition that it must
return immediately or the device gets stuck with a black screen.

But doing this allows us to write code *as if* it worked, which lets the
other transports run free and wild, by which I mean, do the Right Thing
2018-10-10 13:15:28 +02:00
matejcik
4fb3acb029 style: uppercase hex constants to conform with black 18.9b0 style 2018-10-01 14:01:33 +02:00
Pavol Rusnak
4a0ca873eb trezorlib+tools: remove usage of binascii 2018-09-27 16:52:28 +02:00
matejcik
3d3e9b67b4 style: apply black/isort 2018-08-13 18:22:19 +02:00
matejcik
29f928e4f2 style: bare excepts, left-over bad imports 2018-08-10 16:05:14 +02:00
matejcik
5259146a0b style: remove unused imports with autoflake 2018-08-10 15:48:39 +02:00
matejcik
54f1599a5a regenerate license headers
This clarifies the intent: the project is licenced under terms
of LGPL version 3 only, but the standard headers cover only "3 or later",
so we had to rewrite them.

In the same step, we removed author information from individual files
in favor of "SatoshiLabs and contributors", and include an AUTHORS
file that lists the contributors.

Apologies to those whose names are missing; please contact us if you wish
to add your info to the AUTHORS file.
2018-06-21 16:49:13 +02:00
matejcik
e779a251fb transport: better ways to handle errors when enumerating devices 2018-05-24 19:14:05 +02:00
matejcik
97fa4670ac transport: add message logging to bridge 2018-05-24 18:08:50 +02:00
matejcik
40ff849228 flake8: make flake8 better and more strict
this removes some unused variables and also catches a couple bugs
2018-04-10 15:58:34 +02:00
Pavol Rusnak
12c58ce3cc transport: inject info about udev rules into io/os exception 2018-04-03 18:27:38 +02:00
matejcik
5edcea9ba6
transport: fix all_transports when required modules are missing (#232)
This lets the library work without libusb or hidapi (`--disable-libusb`, `--disable-hidapi`).
2018-03-09 10:58:24 +01:00
matejcik
9f2583f893 webusb: check if a device is functional when enumerating
this fixes issue #223 on Windows, where a device would be returned in two copies, only one of which works
2018-03-06 13:32:51 +01:00
matejcik
dc8eec1656 trezorlib/transport: for get_transport(None), raise exception from None if no trezor is found,
because the IndexError should not be part of the traceback
2018-03-05 17:31:11 +01:00
matejcik
2f1c15b588 trezorlib/transport: make flake8 happy 2018-03-05 14:25:37 +01:00
matejcik
6519657808 trezorlib/transport: smarter handling of prefix search
For UDP transport, it's useful to be able to specify a path that should be tried directly,
without enumerating first.
2018-03-02 18:22:33 +01:00
matejcik
d2913c20bd trezorlib/transport: move TrezorDevice functionality to transport and make it better ^_^ 2018-03-02 16:46:10 +01:00
matejcik
bc8120230a trezorlib/transport: make changes to support being a separate submodule, move common functions to superclass 2018-03-02 15:44:24 +01:00
matejcik
473ea19570 trezorlib/transport: rename files as separate step (to make diffs nicer) 2018-03-02 15:35:56 +01:00