common: move AttributeHolder

This commit is contained in:
Roman Zeyde
2015-01-16 09:50:29 +02:00
parent 904966365f
commit babd4a5438
2 changed files with 10 additions and 6 deletions

View File

@@ -72,3 +72,12 @@ class Dummy(object):
def __call__(self, *args, **kwargs):
return self
class AttributeHolder(object):
def __init__(self, d):
self.__dict__.update(d)
def __repr__(self):
return '{}({})'.format(self.__class__.__name__, self.__dict__)