Skip to content

Commit

Permalink
Merge pull request #5 from Uninett/bugfix/python2ism-itervalues
Browse files Browse the repository at this point in the history
Fix Python 2-only usage of dict.itervalues
  • Loading branch information
lunkwill42 authored Nov 15, 2023
2 parents 71d68f3 + 17ca4b9 commit 5397598
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pynetsnmp/twistedsnmp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
import struct
import sys

from six import itervalues

from ipaddr import IPAddress
from twisted.internet import reactor
Expand Down Expand Up @@ -253,7 +254,7 @@ def callback(self, pdu):
else:
message = "packet dropped"

for d in (d for d, rOids in self.defers.itervalues() if not d.called):
for d in (d for d, rOids in itervalues(self.defers) if not d.called):
reactor.callLater(0, d.errback, failure.Failure(Snmpv3Error(message)))

return
Expand Down

0 comments on commit 5397598

Please sign in to comment.