bwpass: Pass TTY name to pinentry
The curses-based pinentry defaults to using its standard input stream to display the prompt, but this fails when stdin is a pipe. It does provide a command-line argument to specify a specific file name, though.master
parent
1c80f5bd73
commit
9cf514009a
|
@ -65,8 +65,9 @@ class Pinentry:
|
|||
|
||||
def getpin(self):
|
||||
codec = locale.getpreferredencoding()
|
||||
tty = os.ttyname(sys.stdin.fileno())
|
||||
p = subprocess.Popen(
|
||||
['pinentry'],
|
||||
['pinentry', '-T', tty],
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
|
|
Reference in New Issue