mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-13 00:16:21 +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
|
is_enc = True
|
||||||
for option in ENCRYPTED_OPTIONS:
|
for option in ENCRYPTED_OPTIONS:
|
||||||
try:
|
try:
|
||||||
if (
|
if config_dict[option["section"]][option["name"]] and not str(
|
||||||
config_dict[option["section"]][option["name"]]
|
config_dict[option["section"]][option["name"]]
|
||||||
and not str(config_dict[option["section"]][option["name"]]).startswith(
|
).startswith(ID_STRING):
|
||||||
ID_STRING
|
|
||||||
)
|
|
||||||
):
|
|
||||||
is_enc = False
|
is_enc = False
|
||||||
except (TypeError, KeyError):
|
except (TypeError, KeyError):
|
||||||
# Don't care about encryption on missing items
|
# 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
|
# Configure lables
|
||||||
label_string = ",".join(
|
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:
|
try:
|
||||||
# Make sure we convert prometheus_additional_labels to list if only one label is given
|
# Make sure we convert prometheus_additional_labels to list if only one label is given
|
||||||
|
|
Loading…
Add table
Reference in a new issue