From: Fred Drake Date: Thu, 29 Jun 2000 05:06:02 +0000 (+0000) Subject: Convert to use class-based exceptions. X-Git-Tag: v2.0b1~1316 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ffdc48f45c7f942192ad19c26766207826ba99fd;p=python Convert to use class-based exceptions. Correct exception information in one docstring. --- diff --git a/Lib/mhlib.py b/Lib/mhlib.py index f7c39fa0ee..9af04b2089 100644 --- a/Lib/mhlib.py +++ b/Lib/mhlib.py @@ -85,7 +85,8 @@ from bisect import bisect # Exported constants -Error = 'mhlib.Error' +class Error(Exception): + pass class MH: @@ -330,7 +331,7 @@ class Folder: f.close() def getcurrent(self): - """Return the current message. Raise KeyError when there is none.""" + """Return the current message. Raise Error when there is none.""" seqs = self.getsequences() try: return max(seqs['cur'])