Example #1
0
File: objects.py Project: flynx/pli
	def __setattr__(self, name, value):
		'''
		'''
##		if name in ('__implements__',):
##			return super(ObjectWithInterface, self).__setattr__(name, value)
		if not hasattr(self, '__implements__') or self.__implements__ == None or \
				interface.iswritable(self, name) and interface.isvaluecompatible(self, name, value):
##			return super(ObjectWithInterface, self).__setattr__(name, value)
			return super(ObjectWithInterface, self).__setattr__(name, interface.getvalue(self, name, value))
		raise interface.InterfaceError, 'can\'t write value "%s" to attribute "%s".' % (value, name)