Skip to content
Snippets Groups Projects
Commit 7575e4f3 authored by 's avatar
Browse files

Converting explicitly the instance returned by pcap_next into a str, since

pcapy returns a buffer instance instead
parent 31eade20
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,9 @@ if conf.use_pcap:
return getattr(self.pcap, attr)
def __del__(self):
warning("__del__: don't know how to close the file descriptor. Bugs ahead ! Please report this bug.")
def next(self):
ts, pkt = self.pcap.next()
return ts, str(pkt)
open_pcap = lambda *args,**kargs: _PcapWrapper_pypcap(*args,**kargs)
elif hasattr(pcap,"pcapObject"): # python-libpcap
class _PcapWrapper_libpcap:
......
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