capture: don't assume that the tmpfile is backed by a BytesIO
Since tmpfile is a parameter to SysCapture, it shouldn't assume things unnecessarily, when there is an alternative.
This commit is contained in:
parent
97bcf5a3a2
commit
fd3ba053cf
|
@ -281,7 +281,8 @@ class SysCaptureBinary:
|
|||
self._state = "started"
|
||||
|
||||
def snap(self):
|
||||
res = self.tmpfile.buffer.getvalue()
|
||||
self.tmpfile.seek(0)
|
||||
res = self.tmpfile.buffer.read()
|
||||
self.tmpfile.seek(0)
|
||||
self.tmpfile.truncate()
|
||||
return res
|
||||
|
|
Loading…
Reference in New Issue