From 6d730e0a5b7610aa85cd868a9d0beff6f230a6dd Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Wed, 14 Mar 2018 12:15:08 +0200 Subject: [PATCH] ui: subprocess.Popen doesn't have 'args' attribute in Python 2 --- libagent/device/ui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libagent/device/ui.py b/libagent/device/ui.py index f74fdea..cdeaa91 100644 --- a/libagent/device/ui.py +++ b/libagent/device/ui.py @@ -91,10 +91,12 @@ def expect(p, prefixes, confidential=False): def interact(title, description, prompt, binary, options): """Use GPG pinentry program to interact with the user.""" - p = subprocess.Popen(args=[binary], + args = [binary] + p = subprocess.Popen(args=args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, env=os.environ) + p.args = args # TODO: remove after Python 2 deprecation. expect(p, [b'OK']) title = util.assuan_serialize(title.encode('ascii'))