Skip to content

Commit ab05cfb

Browse files
committed
comment
1 parent 6eb0771 commit ab05cfb

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

samtranslator/intrinsics/actions.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
def _get_parameter_value(parameters: Dict[str, Any], param_name: str, default: Any = None) -> Any:
99
"""
10-
Get parameter value from parameters dict, but return None if it's a CloudFormation internal placeholder.
10+
Get parameter value from parameters dict, but return default (None) if it's a CloudFormation internal placeholder.
1111
1212
CloudFormation internal placeholders are passed during changeset creation with --include-nested-stacks
1313
when there are cross-references between nested stacks that don't exist yet.
@@ -127,10 +127,7 @@ def resolve_parameter_refs(self, input_dict: Optional[Any], parameters: Dict[str
127127
return input_dict
128128

129129
# Use the wrapper function to get parameter value
130-
# It returns None if the parameter is a CloudFormation internal placeholder
131-
132-
# If param_value is None, either the parameter doesn't exist or it's a placeholder
133-
# Return the original input unchanged
130+
# It returns the original input unchanged if the parameter is a CloudFormation internal placeholder
134131
return _get_parameter_value(parameters, param_name, input_dict)
135132

136133
def resolve_resource_refs(
@@ -220,7 +217,7 @@ def do_replacement(full_ref: str, prop_name: str) -> Any:
220217
:return: Either the value it resolves to. If not the original reference
221218
"""
222219
# Use the wrapper function to get parameter value
223-
# It returns None if the parameter is a CloudFormation internal placeholder
220+
# It returns the original input unchanged if the parameter is a CloudFormation internal placeholder
224221
return _get_parameter_value(parameters, prop_name, full_ref)
225222

226223
return self._handle_sub_action(input_dict, do_replacement)

0 commit comments

Comments
 (0)