Raise AttributeError from Options.__getattr__

This commit is contained in:
Aldo Cortesi 2016-07-13 20:05:17 +12:00
parent c9a0fe6a0e
commit 077850bd10

View File

@ -42,7 +42,10 @@ class Options(object):
return self.__class__(**self._opts) return self.__class__(**self._opts)
def __getattr__(self, attr): def __getattr__(self, attr):
if attr in self._opts:
return self._opts[attr] return self._opts[attr]
else:
raise AttributeError()
def __setattr__(self, attr, value): def __setattr__(self, attr, value):
if attr not in self._opts: if attr not in self._opts: