mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
lambda - more limited exception trap when doing get_function for better errors (#28918)
This commit is contained in:
parent
ae6d27fa29
commit
506a30cf3e
1 changed files with 7 additions and 2 deletions
|
@ -238,8 +238,13 @@ def get_current_function(connection, function_name, qualifier=None):
|
|||
if qualifier is not None:
|
||||
return connection.get_function(FunctionName=function_name, Qualifier=qualifier)
|
||||
return connection.get_function(FunctionName=function_name)
|
||||
except ClientError:
|
||||
except ClientError as e:
|
||||
try:
|
||||
if e.response['Error']['Code'] == 'ResourceNotFoundException':
|
||||
return None
|
||||
except (KeyError, AttributeError):
|
||||
pass
|
||||
raise e
|
||||
|
||||
|
||||
def sha256sum(filename):
|
||||
|
|
Loading…
Reference in a new issue