1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 04:18:10 +00:00

fix(python): do not implicitly import PIL by trezorctl

This commit is contained in:
matejcik 2022-06-30 14:56:11 +02:00
parent 7d40f98153
commit 455884932e
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1 @@
Fixed dependency error when running trezorctl without PIL.

View File

@ -38,7 +38,6 @@ from typing import (
) )
from mnemonic import Mnemonic from mnemonic import Mnemonic
from PIL import Image
from . import mapping, messages, protobuf from . import mapping, messages, protobuf
from .client import TrezorClient from .client import TrezorClient
@ -255,6 +254,8 @@ class DebugLink:
self.save_screenshot_for_t1() self.save_screenshot_for_t1()
def save_screenshot_for_t1(self) -> None: def save_screenshot_for_t1(self) -> None:
from PIL import Image
layout = self.state().layout layout = self.state().layout
assert layout is not None assert layout is not None
assert len(layout) == 128 * 64 // 8 assert len(layout) == 128 * 64 // 8