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.
This commit is contained in:
@@ -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
Block a user