From 86e0f3c8d268afec8ee5025b59cfb87ee4687ada Mon Sep 17 00:00:00 2001 From: elie Date: Tue, 14 Jun 2005 09:12:52 +0000 Subject: PySnmpError simplified --- pysnmp/error.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'pysnmp/error.py') 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 -- cgit v1.2.1