Skip to content

Commit 4739980

Browse files
committed
First argument should be self ClientSubnetOption.from_wire
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
1 parent 72e7b62 commit 4739980

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

regression-tests.dnsdist/clientsubnetoption.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def to_wire(self, file=None):
148148
file.write(data)
149149
return None
150150

151-
def from_wire(cls, otype, wire, current, olen):
151+
def from_wire(self, otype, wire, current, olen):
152152
"""Read EDNS packet as defined in draft-vandergaast-edns-client-subnet-01.
153153
154154
Returns:
@@ -173,7 +173,7 @@ def from_wire(cls, otype, wire, current, olen):
173173
else:
174174
raise Exception("Returned a family other then IPv4 or IPv6")
175175

176-
return cls(ip, mask, scope, otype)
176+
return self(ip, mask, scope, otype)
177177

178178
from_wire = classmethod(from_wire)
179179

0 commit comments

Comments
 (0)