mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 07:16:14 +08:00
more robust ouput_grabber
This commit is contained in:
parent
1e95f70386
commit
11c1c8490c
|
@ -72,7 +72,7 @@ class OutputGrabber(object):
|
|||
and save the text in `capturedtext`.
|
||||
"""
|
||||
while True:
|
||||
char = os.read(self.pipe_out,1).decode(self.origstream.encoding)
|
||||
char = os.read(self.pipe_out,1).decode(self.origstream.encoding, errors='replace')
|
||||
if not char or self.escape_char in char:
|
||||
break
|
||||
self.capturedtext += char
|
||||
|
|
|
@ -72,7 +72,7 @@ class OutputGrabber(object):
|
|||
and save the text in `capturedtext`.
|
||||
"""
|
||||
while True:
|
||||
char = os.read(self.pipe_out,1).decode(self.origstream.encoding)
|
||||
char = os.read(self.pipe_out,1).decode(self.origstream.encoding, errors='replace')
|
||||
if not char or self.escape_char in char:
|
||||
break
|
||||
self.capturedtext += char
|
||||
|
|
Loading…
Reference in a new issue