Skip to content

Commit

Permalink
Fix list service permissions. Fix non displayed Deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnPreston committed Nov 22, 2023
1 parent 15c645f commit 15c57fa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ecs_composex/compose/x_resources/services_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def define_service_to_associate(
return _associated_service

def handle_families_targets_expansion_list(
self, service_name: str, service_def, settings: ComposeXSettings
self, service_name: str, service_def: dict, settings: ComposeXSettings
):
"""
Method to list all families and services that are targets of the resource.
Expand All @@ -95,7 +95,7 @@ def handle_families_targets_expansion_list(
service_name, family_name, settings
)
],
set_else_none(service_def[access_key], service_def, {}),
set_else_none(access_key, service_def, {}),
service_def,
)
)
Expand Down Expand Up @@ -210,10 +210,11 @@ def set_services_targets(self, settings):
LOG.debug(f"{self.module.res_key}.{self.name} No Services defined.")
return
if isinstance(self.services, list):
from warnings import warn
from warnings import simplefilter, warn

simplefilter("always", DeprecationWarning)
warn(
"Services list will be deprecated in future versions. Use Services objects instead.",
"Services list will be deprecated in the next version. Use Services objects instead.",
DeprecationWarning,
)
self.set_services_targets_from_list(settings)
Expand Down

0 comments on commit 15c57fa

Please sign in to comment.