From d1c160d5df1220d76ebc36118f4d898c34cfc969 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Apr 2012 13:03:10 -0400 Subject: [PATCH] Use bytes for 'D' response parameters in pinentry.py. --- bin/pinentry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/pinentry.py b/bin/pinentry.py index f78bafc..9d0e725 100755 --- a/bin/pinentry.py +++ b/bin/pinentry.py @@ -216,9 +216,9 @@ class PinEntry (_server.AssuanServer): def _handle_GETINFO(self, arg): if arg == 'pid': - yield _common.Response('D', str(_os.getpid())) + yield _common.Response('D', str(_os.getpid()).encode('ascii')) elif arg == 'version': - yield _common.Response('D', __version__) + yield _common.Response('D', __version__.encode('ascii')) else: raise _error.AssuanError(message='Invalid parameter') yield _common.Response('OK') @@ -283,7 +283,7 @@ class PinEntry (_server.AssuanServer): pin = self._prompt(self.strings['prompt'], add_colon=False) finally: self._disconnect() - yield _common.Response('D', pin) + yield _common.Response('D', pin.encode('ascii')) yield _common.Response('OK') def _handle_CONFIRM(self, arg): -- 2.26.2