Skip to content

Commit a79e332

Browse files
author
Erik Steringer
committed
hotfix: client_args_map set to None caused errors
1 parent b502352 commit a79e332

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

principalmapper/graphing/autoscaling_edges.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ def return_edges(self, nodes: List[Node], region_allow_list: Optional[List[str]]
4040

4141
logger.info('Generating Edges based on EC2 Auto Scaling.')
4242

43-
asargs = client_args_map.get('autoscaling', {})
43+
if client_args_map is None:
44+
asargs = {}
45+
else:
46+
asargs = client_args_map.get('autoscaling', {})
4447

4548
# Gather projects information for each region
4649
autoscaling_clients = []

principalmapper/graphing/cloudformation_edges.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ def return_edges(self, nodes: List[Node], region_allow_list: Optional[List[str]]
4242

4343
logger.info('Pulling data on CloudFormation stacks.')
4444

45-
cfargs = client_args_map.get('cloudformation', {})
45+
if client_args_map is None:
46+
cfargs = {}
47+
else:
48+
cfargs = client_args_map.get('cloudformation', {})
4649

4750
# Grab existing stacks in each region
4851
cloudformation_clients = []

principalmapper/graphing/codebuild_edges.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ def return_edges(self, nodes: List[Node], region_allow_list: Optional[List[str]]
4242

4343
# Gather projects information for each region
4444

45-
cbargs = client_args_map.get('codebuild', {})
45+
if client_args_map is None:
46+
cbargs = {}
47+
else:
48+
cbargs = client_args_map.get('codebuild', {})
4649

4750
codebuild_clients = []
4851
if self.session is not None:

principalmapper/graphing/lambda_edges.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ def return_edges(self, nodes: List[Node], region_allow_list: Optional[List[str]]
4242

4343
logger.info('Pulling data on Lambda functions')
4444

45-
lambdaargs = client_args_map.get('lambda', {})
45+
if client_args_map is None:
46+
lambdaargs = {}
47+
else:
48+
lambdaargs = client_args_map.get('lambda', {})
4649

4750
lambda_clients = []
4851
if self.session is not None:

0 commit comments

Comments
 (0)