mirror of
https://github.com/python/cpython.git
synced 2025-09-02 15:07:53 +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
|
# Exported constants
|
||||||
|
|
||||||
Error = 'mhlib.Error'
|
class Error(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class MH:
|
class MH:
|
||||||
|
@ -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'])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue