Kaydet (Commit) ffdc48f4 authored tarafından Fred Drake's avatar Fred Drake

Convert to use class-based exceptions.

Correct exception information in one docstring.
üst 8aa3bd90
...@@ -85,7 +85,8 @@ from bisect import bisect ...@@ -85,7 +85,8 @@ from bisect import bisect
# Exported constants # Exported constants
Error = 'mhlib.Error' class Error(Exception):
pass
class MH: class MH:
...@@ -330,7 +331,7 @@ class Folder: ...@@ -330,7 +331,7 @@ class Folder:
f.close() f.close()
def getcurrent(self): 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() seqs = self.getsequences()
try: try:
return max(seqs['cur']) return max(seqs['cur'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment