mirror of
https://github.com/romanz/amodem.git
synced 2026-05-05 01:26:29 +08:00
trezor: split pinentry tool into a separate file
This commit is contained in:
@@ -16,9 +16,7 @@ log = logging.getLogger(__name__)
|
||||
|
||||
def _message_box(label, sp=subprocess):
|
||||
"""Launch an external process for PIN/passphrase entry GUI."""
|
||||
cmd = ('import sys, pymsgbox; '
|
||||
'sys.stdout.write(pymsgbox.password(sys.stdin.read()))')
|
||||
args = [sys.executable, '-c', cmd]
|
||||
args = [sys.executable, '-m', 'libagent.device.ui.simple']
|
||||
p = sp.Popen(args=args, stdin=sp.PIPE, stdout=sp.PIPE, stderr=sp.PIPE)
|
||||
out, err = p.communicate(label.encode('ascii'))
|
||||
exitcode = p.wait()
|
||||
|
||||
Reference in New Issue
Block a user