Skip to content
Snippets Groups Projects
Commit e62d456c authored by Pierre LALET's avatar Pierre LALET
Browse files

Close pcap files in .__exit__() (fixes #5126)

--HG--
branch : issue-5126
parent 8587f78b
No related branches found
No related tags found
No related merge requests found
......@@ -618,7 +618,7 @@ class RawPcapReader:
return self
def __exit__(self, exc_type, exc_value, tracback):
pass
self.close()
class PcapReader(RawPcapReader):
......@@ -750,6 +750,7 @@ class RawPcapWriter:
return self
def __exit__(self, exc_type, exc_value, tracback):
self.flush()
self.close()
class PcapWriter(RawPcapWriter):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment