fix gpg_agent.py

This commit is contained in:
NIIBE Yutaka
2013-01-21 09:22:21 +09:00
parent 220d5c0307
commit 3ad9373163
2 changed files with 5 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
2013-01-20 Niibe Yutaka <gniibe@fsij.org>
* tool/gpg_agent.py: New.
2013-01-11 Niibe Yutaka <gniibe@fsij.org> 2013-01-11 Niibe Yutaka <gniibe@fsij.org>
* tool/pinpadtest.py: Add fixed length input. * tool/pinpadtest.py: Add fixed length input.

View File

@@ -36,7 +36,7 @@ class gpg_agent(object):
else: else:
chunk = self.sock.recv(BUFLEN) chunk = self.sock.recv(BUFLEN)
while True: while True:
pos = chunk.index('\n') pos = chunk.find('\n')
if pos >= 0: if pos >= 0:
self.buf_remained = chunk[pos+1:] self.buf_remained = chunk[pos+1:]
line = line + chunk[0:pos] line = line + chunk[0:pos]