Skip to content

Commit bdf2d18

Browse files
authored
Handle missing Datadog agent when removing config (#167)
1 parent f5fd915 commit bdf2d18

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scfw/configure/dd_agent.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ def remove_agent_logging():
5353
Raises:
5454
RuntimeError: An error occurred while attempting to remove the configuration directory.
5555
"""
56-
scfw_config_dir = _dd_agent_scfw_config_dir()
56+
try:
57+
scfw_config_dir = _dd_agent_scfw_config_dir()
58+
except FileNotFoundError:
59+
_log.info("Datadog Agent binary is not available; no configuration to remove")
60+
return
5761

5862
if not scfw_config_dir.is_dir():
5963
_log.info("No Datadog Agent configuration directory to remove")

0 commit comments

Comments
 (0)