def _run_hook(cmd_name, shell_cmd): """Run a hook command. :param str cmd_name: the user facing name of the hook being run :param shell_cmd: shell command to execute :type shell_cmd: `list` of `str` or `str` :returns: stderr if there was any""" err, _ = misc.execute_command(cmd_name, shell_cmd) return err
def _call(cls, *args, **kwargs): from certbot.compat.misc import execute_command return execute_command(*args, **kwargs)
def _execute_hook(self, hook_name): return misc.execute_command(self.option_name(hook_name), self.conf(hook_name))
def _execute_hook(self, hook_name): return misc.execute_command(self.option_name(hook_name), self.conf(hook_name), env=util.env_no_snap_for_external_calls())
def _call(cls, *args, **kwargs): from certbot.compat.misc import execute_command # execute_command is superseded by execute_command_status with warnings.catch_warnings(): warnings.simplefilter('ignore', category=PendingDeprecationWarning) return execute_command(*args, **kwargs)