mirror of
https://github.com/romanz/amodem.git
synced 2026-04-20 21:26:39 +08:00
ui: subprocess.Popen doesn't have 'args' attribute in Python 2
This commit is contained in:
@@ -91,10 +91,12 @@ def expect(p, prefixes, confidential=False):
|
|||||||
|
|
||||||
def interact(title, description, prompt, binary, options):
|
def interact(title, description, prompt, binary, options):
|
||||||
"""Use GPG pinentry program to interact with the user."""
|
"""Use GPG pinentry program to interact with the user."""
|
||||||
p = subprocess.Popen(args=[binary],
|
args = [binary]
|
||||||
|
p = subprocess.Popen(args=args,
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
env=os.environ)
|
env=os.environ)
|
||||||
|
p.args = args # TODO: remove after Python 2 deprecation.
|
||||||
expect(p, [b'OK'])
|
expect(p, [b'OK'])
|
||||||
|
|
||||||
title = util.assuan_serialize(title.encode('ascii'))
|
title = util.assuan_serialize(title.encode('ascii'))
|
||||||
|
|||||||
Reference in New Issue
Block a user