From c86c4218ce4b7dbc885a05abfa73140dab5ae929 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 5 Sep 2021 14:51:50 -0400 Subject: [PATCH] Allow blank accounts config --- piker/brokers/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/piker/brokers/config.py b/piker/brokers/config.py index 3805f9c8..1fbd8ce1 100644 --- a/piker/brokers/config.py +++ b/piker/brokers/config.py @@ -114,8 +114,9 @@ def load_accounts() -> dict[str, Optional[str]]: if section is None: log.warning('No accounts config found?') - for brokername, account_labels in section.items(): - for name, value in account_labels.items(): - accounts[f'{brokername}.{name}'] = value + else: + for brokername, account_labels in section.items(): + for name, value in account_labels.items(): + accounts[f'{brokername}.{name}'] = value return accounts