'Call a function with current object as argument'

def cmd_function(self, function, *args, **kwargs):

    try:
        function(self, *args, **kwargs)
    except Exception:
        error = traceback.format_exc()
        logger.error(('Exception    calling    "%s":\n%s' % (function, error)))
