コード例 #1
0
ファイル: hooks.py プロジェクト: Mattlk13/certbot-1
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
コード例 #2
0
 def _call(cls, *args, **kwargs):
     from certbot.compat.misc import execute_command
     return execute_command(*args, **kwargs)
コード例 #3
0
 def _execute_hook(self, hook_name):
     return misc.execute_command(self.option_name(hook_name),
                                 self.conf(hook_name))
コード例 #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())
コード例 #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)