diff options
author | elie <elie> | 2007-11-25 14:52:04 +0000 |
---|---|---|
committer | elie <elie> | 2007-11-25 14:52:04 +0000 |
commit | 34a41cc0fb72d545fda3115b2b97d4e39c014f4e (patch) | |
tree | ab727b5058e5caf8a723b98c36b6fbe515a92907 | |
parent | 71d51ce958deb2766134c5d477008fddb8bfa61a (diff) | |
download | pysnmp-34a41cc0fb72d545fda3115b2b97d4e39c014f4e.tar.gz |
__cmp__ methods added to __hash__ ones in configuration classes to match
standard mapping interface
-rw-r--r-- | pysnmp/entity/rfc3413/oneliner/cmdgen.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pysnmp/entity/rfc3413/oneliner/cmdgen.py b/pysnmp/entity/rfc3413/oneliner/cmdgen.py index 677fe4f..c5eec54 100644 --- a/pysnmp/entity/rfc3413/oneliner/cmdgen.py +++ b/pysnmp/entity/rfc3413/oneliner/cmdgen.py @@ -35,6 +35,7 @@ class CommunityData: ) def __hash__(self): return self.__hash + def __cmp__(self, other): return cmp(self.__hash, other) class UsmUserData: authKey = privKey = None @@ -77,7 +78,8 @@ class UsmUserData: ) def __hash__(self): return self.__hash - + def __cmp__(self, other): return cmp(self.__hash, other) + class UdpTransportTarget: transportDomain = udp.domainName def __init__(self, transportAddr, timeout=1, retries=5): |