From b1af304125ff07bf65ac7eaa71f59e2cfff8a25f Mon Sep 17 00:00:00 2001 From: Tony Fernandez Date: Tue, 12 Nov 2024 09:59:02 -0500 Subject: [PATCH] better data dict creation --- borgmatic/hooks/pushover.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/borgmatic/hooks/pushover.py b/borgmatic/hooks/pushover.py index 439f2720..f6a31030 100644 --- a/borgmatic/hooks/pushover.py +++ b/borgmatic/hooks/pushover.py @@ -48,14 +48,14 @@ def ping_monitor(hook_config, config, config_filename, state, monitoring_log_lev state_config.pop('expire', None) state_config.pop('retry', None) - data = { - 'token': token, - 'user': user, - 'message': state.name.lower(), # default to state name. Can be overwritten in state_config loop below. - } - - for key in state_config: - data[key] = state_config[key] + data = dict( + { + 'token': token, + 'user': user, + 'message': state.name.lower(), # default to state name. Can be overwritten in state_config loop below. + }, + **state_config, + ) if not dry_run: logging.getLogger('urllib3').setLevel(logging.ERROR)