From 51a9fe6bc298dea017b6d159794562e8e51da8fe Mon Sep 17 00:00:00 2001 From: Dave Yesland <41924355+DaveYesland@users.noreply.github.com> Date: Mon, 8 Jan 2024 14:00:04 -0800 Subject: [PATCH] Fixes #392 --- pacu/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pacu/main.py b/pacu/main.py index 77319374..8672a7f3 100644 --- a/pacu/main.py +++ b/pacu/main.py @@ -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: