def _run()

in wadebug/wa_actions/implementations/check_mysql_password.py [0:0]


    def _run(cls, config, *args, **kwargs):
        errors = []
        wa_containers = docker_utils.get_running_wa_containers()
        if wa_containers:
            password = docker_utils.get_mysql_password(wa_containers[0])
        else:
            # if containers not giving password then get password from db config file
            password = config.get("db").get("password")

        if set(INVALID_CHARACTERS) & set(password):
            errors.append(
                "Please make sure mysql password do not have "
                "any special characters from {}".format(INVALID_CHARACTERS)
            )

        if errors:
            return results.Problem(
                cls,
                "Your mysql password contains some invalid characters",
                "\n".join(errors),
                "",
            )
        return results.OK(cls)