mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
python/trezorctl: improve get-session
This commit is contained in:
parent
b4846e484a
commit
1cc1382153
@ -148,6 +148,7 @@ def configure_logging(verbose: int):
|
|||||||
@click.option(
|
@click.option(
|
||||||
"-s",
|
"-s",
|
||||||
"--session-id",
|
"--session-id",
|
||||||
|
metavar="HEX",
|
||||||
help="Resume given session ID.",
|
help="Resume given session ID.",
|
||||||
default=os.environ.get("TREZOR_SESSION_ID"),
|
default=os.environ.get("TREZOR_SESSION_ID"),
|
||||||
)
|
)
|
||||||
@ -255,6 +256,9 @@ def get_session(connect):
|
|||||||
from ..client import PASSPHRASE_TEST_PATH
|
from ..client import PASSPHRASE_TEST_PATH
|
||||||
|
|
||||||
client = connect()
|
client = connect()
|
||||||
|
if client.features.model == "1" and client.version < (1, 9, 0):
|
||||||
|
raise click.ClickException("Upgrade your firmware to enable session support.")
|
||||||
|
|
||||||
get_address(client, "Testnet", PASSPHRASE_TEST_PATH)
|
get_address(client, "Testnet", PASSPHRASE_TEST_PATH)
|
||||||
if client.session_id is None:
|
if client.session_id is None:
|
||||||
raise click.ClickException("Passphrase not enabled or firmware too old.")
|
raise click.ClickException("Passphrase not enabled or firmware too old.")
|
||||||
|
Loading…
Reference in New Issue
Block a user