Skip to content

Commit

Permalink
Apply PR Suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: Mehmet Nuri Deveci <[email protected]>
  • Loading branch information
driverpt and mndeveci committed Jan 30, 2025
1 parent 94bc1e4 commit 8e02b00
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions samcli/lib/sync/flows/alias_version_sync_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,8 @@ def _equality_keys(self) -> Any:

def _get_version_alias_if_exists(self) -> Optional[str]:
try:
return str(
self._lambda_client.get_alias(
FunctionName=self.get_physical_id(self._function_identifier), Name=self._alias_name
).get("FunctionVersion")
)
return self._lambda_client.get_alias(
FunctionName=self.get_physical_id(self._function_identifier), Name=self._alias_name
).get("FunctionVersion")
except self._lambda_client.exceptions.ResourceNotFoundException:
return None

0 comments on commit 8e02b00

Please sign in to comment.