Beispiel #1
0
def getattr(obj, name, uid=None):
    """
	"""
    if isaccessible(obj) and _hasattr(obj, name) and interface.isreadable(obj, name):
        o_obj = _getattr(obj, name)
        if isaccessible(o_obj):
            return o_obj
    raise AttributeError, '"%s" object has no attribute "%s".' % (obj, name)
Beispiel #2
0
def hasattr(obj, name, uid=None):
    """
	"""
    if isaccessible(obj) and _hasattr(obj, name) and interface.isreadable(obj, name):
        o_obj = getattr(obj, name)
        if isaccessible(o_obj):
            return True
    return False