Skip to content

Commit b598fc0

Browse files
authored
Removing cfn_plugin name check while destroying team. (awslabs#316)
1 parent c819de5 commit b598fc0

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

cli/aws_orbit/remote_files/teams.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -177,17 +177,16 @@ def destroy_team(context: "Context", team_context: "TeamContext") -> None:
177177
_logger.debug("Team specific post_hook execute to destroy the cfn resources")
178178
_logger.debug(f"team_context.plugins={team_context.plugins}")
179179
for plugin in team_context.plugins:
180-
_logger.debug(f"post hook plugin={plugin}")
181-
if plugin.plugin_id == "custom_cfn":
182-
hook: plugins.HOOK_TYPE = plugins.PLUGINS_REGISTRIES.get_hook(
183-
context=context,
184-
team_name=team_context.name,
185-
plugin_name=plugin.plugin_id,
186-
hook_name="post_hook",
187-
)
188-
if hook is not None:
189-
_logger.debug(f"Found post hook for team {team_context.name} plugin {plugin.plugin_id}")
190-
hook(plugin.plugin_id, context, team_context, plugin.parameters)
180+
_logger.debug(f"Checking post hook for plugin={plugin}")
181+
hook: plugins.HOOK_TYPE = plugins.PLUGINS_REGISTRIES.get_hook(
182+
context=context,
183+
team_name=team_context.name,
184+
plugin_name=plugin.plugin_id,
185+
hook_name="post_hook",
186+
)
187+
if hook is not None:
188+
_logger.debug(f"Found post hook for team {team_context.name} plugin {plugin.plugin_id}")
189+
hook(plugin.plugin_id, context, team_context, plugin.parameters)
191190

192191

193192
def destroy_all(context: "Context") -> None:

0 commit comments

Comments
 (0)