make revlog.LookupError inherit from KeyError
authorAlexander Solovyov <piranha@piranha.org.ua>
Wed, 18 Jun 2008 12:48:04 +0200
changeset 6700 9080f7031f69
parent 6699 386561a5179a
child 6701 bf72e756c98b
make revlog.LookupError inherit from KeyError This will improve integration with external applications which depend on KeyError, which is usually raised by __getitem__ calls.
mercurial/revlog.py
--- a/mercurial/revlog.py	Wed Jun 18 09:13:39 2008 +0100
+++ b/mercurial/revlog.py	Wed Jun 18 12:48:04 2008 +0200
@@ -32,7 +32,7 @@
 class RevlogError(Exception):
     pass
 
-class LookupError(RevlogError):
+class LookupError(RevlogError, KeyError):
     def __init__(self, name, index, message):
         self.name = name
         if isinstance(name, str) and len(name) == 20: