summaryrefslogtreecommitdiff
path: root/pysnmp/error.py
diff options
context:
space:
mode:
authorelie <elie>2005-06-14 09:12:52 +0000
committerelie <elie>2005-06-14 09:12:52 +0000
commit86e0f3c8d268afec8ee5025b59cfb87ee4687ada (patch)
treee127decc701717c45c8523dc7daf63050b5b4d0b /pysnmp/error.py
parent076d584e91d56521654c71d66cdc85e03faa9a08 (diff)
downloadpysnmp-git-86e0f3c8d268afec8ee5025b59cfb87ee4687ada.tar.gz
PySnmpError simplified
Diffstat (limited to 'pysnmp/error.py')
-rw-r--r--pysnmp/error.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/pysnmp/error.py b/pysnmp/error.py
index fcfdf226..48ab1011 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