mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Merge pull request #10558 from hagbarddenstore/devel
Always define error before using it
This commit is contained in:
@@ -382,6 +382,8 @@ class Ec2Inventory(object):
|
||||
for instance in instances:
|
||||
self.add_rds_instance(instance, region)
|
||||
except boto.exception.BotoServerError, e:
|
||||
error = e.reason
|
||||
|
||||
if e.error_code == 'AuthFailure':
|
||||
error = self.get_auth_error_message()
|
||||
if not e.reason == "Forbidden":
|
||||
|
||||
Reference in New Issue
Block a user