changeset 6700:9080f7031f69

make revlog.LookupError inherit from KeyError This will improve integration with external applications which depend on KeyError, which is usually raised by __getitem__ calls.
author Alexander Solovyov <piranha@piranha.org.ua>
date Wed, 18 Jun 2008 12:48:04 +0200
parents 386561a5179a
children bf72e756c98b
files mercurial/revlog.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: