Make NonExistentRegistryEntry subclass AttributeError.

This commit is contained in:
Valentin Lorentz 2012-08-04 15:11:45 +02:00
parent 7d73a7dc0a
commit 69c18aed08

View File

@ -57,7 +57,10 @@ class InvalidRegistryName(RegistryException):
class InvalidRegistryValue(RegistryException):
pass
class NonExistentRegistryEntry(RegistryException):
class NonExistentRegistryEntry(RegistryException, AttributeError):
# If we use hasattr() on a configuration group/value, Python 3 calls
# __getattr__ and looks for an AttributeError, so __getattr__ has to
# raise an AttributeError if a registry entry does not exist.
pass
_cache = utils.InsensitivePreservingDict()