diff options
author | elie <elie> | 2005-06-14 09:12:52 +0000 |
---|---|---|
committer | elie <elie> | 2005-06-14 09:12:52 +0000 |
commit | 72b71f5b21953c402ac01e08235f528b697c9095 (patch) | |
tree | 105a0123473cee636c52f800b4ff0383c8bd37b3 /pysnmp/error.py | |
parent | 94e7c44b9abce35f7c6abb5db3c05756d0b42edb (diff) | |
download | pysnmp-72b71f5b21953c402ac01e08235f528b697c9095.tar.gz |
PySnmpError simplified
Diffstat (limited to 'pysnmp/error.py')
-rw-r--r-- | pysnmp/error.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/pysnmp/error.py b/pysnmp/error.py index fcfdf22..48ab101 100644 --- a/pysnmp/error.py +++ b/pysnmp/error.py @@ -1,12 +1 @@ -# Top-level exception class -class PySnmpError(Exception): - def __init__(self, why=None): - Exception.__init__(self) - self.why = why - def __str__(self): return str(self.why) - def __repr__(self): return self.__class__.__name__ + '(' + repr(self.why) + ')' - def __nonzero__(self): - if self.why: return 1 - else: return 0 - -class PySnmpVersionError(PySnmpError): pass +class PySnmpError(StandardError): pass |