mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 03:48:14 +00:00
Hash Port objects by port spec, fixing breakage
This commit is contained in:
parent
3e58be1551
commit
74708c3e3a
1 changed files with 2 additions and 1 deletions
|
|
@ -324,7 +324,8 @@ class Port(object):
|
|||
def spec_string(self):
|
||||
return u"%d/%s" % self.spec
|
||||
|
||||
__hash__ = None
|
||||
def __hash__(self):
|
||||
return hash(self.spec)
|
||||
|
||||
def __cmp__(self, other):
|
||||
d = cmp(self.spec, other.spec)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue