Exemplo n.º 1
0
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
Exemplo n.º 2
0
 def _call(cls, *args, **kwargs):
     from certbot.compat.misc import execute_command
     return execute_command(*args, **kwargs)
Exemplo n.º 3
0
 def _execute_hook(self, hook_name):
     return misc.execute_command(self.option_name(hook_name),
                                 self.conf(hook_name))
Exemplo n.º 4
0
 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())
Exemplo n.º 5
0
 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)