yimingliu / py-natpmp

a NAT-PMP library for Python
http://blog.yimingliu.com/2008/01/07/nat-pmp-client-library-for-python
Other
47 stars 19 forks source link

output bug #7

Closed dog-2 closed 10 years ago

dog-2 commented 10 years ago

in NATPMP.py line 156:

return "PublicAddressResponse: version %d, opcode %d (%d), result %d, ssec %d, ip %s" % (self.version, self.opcode, self.result, self.sec_since_epoch, self.ip)

an argument was missed, the right may be

return "PublicAddressResponse: version %d, opcode %d (%d), result %d, ssec %d, ip %s" % (self.version, self.opcode, self.opcode, self.result, self.sec_since_epoch, self.ip)
yimingliu commented 10 years ago

fixed in e421d2f5d6562da5710d33511e02c49d27ac00b7 by removing the extraneous (%d) opcode requested in the string. I think this was a leftover from when the code was internal to another of my projects, and never removed when I factored it out into its own component.