Skip to content

Commit f8f44df

Browse files
authored
Merge pull request #13 from owen-propeller/patch-1
BUGFIX: AttributeError: 'tuple' object has no attribute 'keys'
2 parents e962023 + 0e0d99e commit f8f44df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

enableDetective.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def accept_invitations(role: str, accounts: typing.Set[str], graph: str, region:
303303
except Exception as e:
304304
logging.exception(f'error accepting invitation {e.args}')
305305

306-
def enable_detective(d_client: botocore.client.BaseClient, region: str, tags: dict = None):
306+
def enable_detective(d_client: botocore.client.BaseClient, region: str, tags: dict = {}):
307307
graphs = get_graphs(d_client)
308308

309309
if not graphs:
@@ -349,7 +349,8 @@ def chunked(it, size):
349349
logging.exception(f'error creating session {e.args}')
350350

351351
#Chunk the list of accounts in the .csv into batches of 50 due to the API limitation of 50 accounts per invokation
352-
for chunk in chunked(aws_account_dict.items(), 50):
352+
for chunk_tuple in chunked(aws_account_dict.items(), 50):
353+
chunk = {x: y for x, y in chunk_tuple}
353354

354355
for region in detective_regions:
355356
try:

0 commit comments

Comments
 (0)