From f74e46cf473c3c2197c073cccc3ae4446c9b03a1 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 31 Mar 2002 13:59:18 +0000 Subject: [PATCH] Derive exception classes from Exception --- Lib/tabnanny.py | 2 +- Lib/xdrlib.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/tabnanny.py b/Lib/tabnanny.py index a0492e65c90..7d2ca52dea8 100755 --- a/Lib/tabnanny.py +++ b/Lib/tabnanny.py @@ -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): diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py index 7b02c41d01e..270604799d4 100644 --- a/Lib/xdrlib.py +++ b/Lib/xdrlib.py @@ -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: