MCPcopy
hub / github.com/certbot/certbot / _run_pre_hook_if_necessary

Function _run_pre_hook_if_necessary

certbot/src/certbot/_internal/hooks.py:85–98  ·  view source on GitHub ↗

Run the specified pre-hook if we haven't already. If we've already run this exact command before, a message is logged saying the pre-hook was skipped. :param str command: pre-hook to be run

(command: str)

Source from the content-addressed store, hash-verified

83
84
85def _run_pre_hook_if_necessary(command: str) -> None:
86 """Run the specified pre-hook if we haven't already.
87
88 If we've already run this exact command before, a message is logged
89 saying the pre-hook was skipped.
90
91 :param str command: pre-hook to be run
92
93 """
94 if command in executed_pre_hooks:
95 logger.info("Pre-hook command already run, skipping: %s", command)
96 else:
97 _run_hook("pre-hook", command)
98 executed_pre_hooks.add(command)
99
100
101def post_hook(

Callers 1

pre_hookFunction · 0.85

Calls 2

_run_hookFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected