def requires_files(files):
    """Decorator for creating a handler that requies files be present in the extras dir in order to run

    files: required files to be present for the handler to be available
    """
    def check_files_precondition():
        for file in files:
            if not os.path.exists(extras.get_extras_path(file)):
                return False, "required file %s not found" % (file)
        return True, ""
    def wrapper(cls):
        cls.check_precondition = _build_precondition_join_fn(cls, check_files_precondition)
        return cls
    return wrapper
Decorator for creating a handler that requies files be present in the extras dir in order to run

    files: required files to be present for the handler to be available
    
nogotofail/mitm/connection/handlers/preconditions.py