Skip to content

Commit

Permalink
Python3 compatibility fix
Browse files Browse the repository at this point in the history
  • Loading branch information
etene committed Oct 20, 2017
1 parent d98117e commit 0e387a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nldecap.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,10 @@ def __init__(self, pcap_fd):
def __iter__(self):
return self._packets

def next(self):
return self._packets.next()
def __next__(self):
return next(self._packets)

next = __next__

def _yield_packets(self):
"""For each valid netlink packet in the pcap file, yield its family
Expand Down

0 comments on commit 0e387a5

Please sign in to comment.