mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-12 16:04:48 +08:00
Reformat files with black
This commit is contained in:
parent
da7fa826d0
commit
96d4268cbe
2 changed files with 3 additions and 6 deletions
|
@ -141,12 +141,9 @@ def is_encrypted(config_dict: dict) -> bool:
|
|||
is_enc = True
|
||||
for option in ENCRYPTED_OPTIONS:
|
||||
try:
|
||||
if (
|
||||
if config_dict[option["section"]][option["name"]] and not str(
|
||||
config_dict[option["section"]][option["name"]]
|
||||
and not str(config_dict[option["section"]][option["name"]]).startswith(
|
||||
ID_STRING
|
||||
)
|
||||
):
|
||||
).startswith(ID_STRING):
|
||||
is_enc = False
|
||||
except (TypeError, KeyError):
|
||||
# Don't care about encryption on missing items
|
||||
|
|
|
@ -66,7 +66,7 @@ def metric_writer(config_dict: dict, restic_result: bool, result_string: str):
|
|||
|
||||
# Configure lables
|
||||
label_string = ",".join(
|
||||
[f"{key}=\"{value}\"" for key, value in labels.items() if value]
|
||||
[f'{key}="{value}"' for key, value in labels.items() if value]
|
||||
)
|
||||
try:
|
||||
# Make sure we convert prometheus_additional_labels to list if only one label is given
|
||||
|
|
Loading…
Add table
Reference in a new issue