Derive exception classes from Exception

This commit is contained in:
Neal Norwitz 2002-03-31 13:59:18 +00:00
parent 27a353020b
commit f74e46cf47
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ def main():
for arg in args:
check(arg)
class NannyNag:
class NannyNag(Exception):
def __init__(self, lineno, msg, line):
self.lineno, self.msg, self.line = lineno, msg, line
def get_lineno(self):

View File

@ -13,7 +13,7 @@ except ImportError:
__all__ = ["Error", "Packer", "Unpacker", "ConversionError"]
# exceptions
class Error:
class Error(Exception):
"""Exception class for this module. Use:
except xdrlib.Error, var: