Raise an error that was suppressed to please Travis-CI

This commit is contained in:
Stefan van der Walt
2014-12-15 02:22:22 +02:00
parent 7f8cd65675
commit 655aca6fed
+2 -5
View File
@@ -72,16 +72,13 @@ class RequiredAttr(object):
instances = dict()
def __init__(self, msg='Required attribute not set', init_val=None):
def __init__(self, init_val=None):
self.instances[self, None] = init_val
self.msg = msg
def __get__(self, obj, objtype):
value = self.instances[self, obj]
if value is None:
# Should raise an error but that causes issues with the buildbot.
warnings.warn(self.msg)
self.__set__(obj, self.init_val)
raise AttributeError('Required attribute not set')
return value
def __set__(self, obj, value):