mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Convert to use class-based exceptions.
Correct exception information in one docstring.
This commit is contained in:
parent
8aa3bd9098
commit
ffdc48f45c
1 changed files with 3 additions and 2 deletions
|
@ -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'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue