Skip to content

Commit

Permalink
Merge branch 'master' into enhancement/improve_credential_handeling
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveYesland authored Jan 9, 2024
2 parents c32b7e2 + 2a2f50d commit c93b5a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pacu/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,11 @@ def get_regions(self, service, check_session=True) -> List[Optional[str]]:
with open(Path(__file__).parent/'modules/service_regions.json', 'r') as regions_file:
regions = json.load(regions_file)

valid_regions = regions[service]
# Try to get the regions for the service, if the service does not exist just set to all
try:
valid_regions = regions[service]
except KeyError:
valid_regions = regions['all']

if 'all' not in session.session_regions:
if check_session is True:
Expand Down

0 comments on commit c93b5a4

Please sign in to comment.