From 332fc18403f8853ee1f268022e0fef2b84d462dd Mon Sep 17 00:00:00 2001 From: barneydobson Date: Fri, 15 Mar 2024 09:29:54 +0000 Subject: [PATCH] Update swmmanywhere/swmmanywhere.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Diego Alonso Álvarez <6095790+dalonsoa@users.noreply.github.com> --- swmmanywhere/swmmanywhere.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swmmanywhere/swmmanywhere.py b/swmmanywhere/swmmanywhere.py index 58eaea39..0fb46cb3 100644 --- a/swmmanywhere/swmmanywhere.py +++ b/swmmanywhere/swmmanywhere.py @@ -47,8 +47,8 @@ def swmmanywhere(config_: Path | dict): Path(config['base_dir']) ) - for key, val in config['address_overrides'].items(): - setattr(addresses,key,val) + for key, val in config.get('address_overrides', {}).items(): + setattr(addresses, key, val) # Run downloads api_keys = yaml.safe_load(config['api_keys'].open('r'))