mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-08 22:15:48 +08:00
Avoid injecting empty dicts into repo_config
This commit is contained in:
parent
ce8fbb7bf3
commit
a9696b46a1
1 changed files with 4 additions and 2 deletions
|
@ -747,12 +747,14 @@ def get_repo_config(
|
|||
|
||||
# Merge prometheus global settings with repo settings
|
||||
try:
|
||||
repo_config.s("global_email", deepcopy(full_config.g("global_email")))
|
||||
if full_config.g("global_email"):
|
||||
repo_config.s("global_email", deepcopy(full_config.g("global_email")))
|
||||
except KeyError:
|
||||
logger.info("No global email settings found")
|
||||
|
||||
try:
|
||||
repo_config.s("global_prometheus", deepcopy(full_config.g("global_prometheus")))
|
||||
if full_config.g("global_prometheus"):
|
||||
repo_config.s("global_prometheus", deepcopy(full_config.g("global_prometheus")))
|
||||
except KeyError:
|
||||
logger.info("No global prometheus settings found")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue