lambda: fix unboundLocalError in lambda (#46729)

This fix initializes current_version to None so that
module proceeds in check mode.

Fixes: #46654

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2018-10-10 22:57:58 +05:30 committed by GitHub
parent 80d977bac6
commit 32397531d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -554,6 +554,7 @@ def main():
'SecurityGroupIds': vpc_security_group_ids}})
# Finally try to create function
current_version = None
try:
if not check_mode:
response = client.create_function(**func_kwargs)