def checkAttr(self, attrName):
    """ Checks if an attribute exist otherwise raise an error"""

    if not hasattr(self, attrName):
        raise AttributeError('module has no attribute ' + attrName)
        return False
    return True