mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-08 14:05:41 +08:00
Reformat files with black
This commit is contained in:
parent
e63d6558a8
commit
4ec85f3eed
2 changed files with 8 additions and 4 deletions
|
@ -46,7 +46,9 @@ def metric_writer(config_dict: dict, restic_result: bool, result_string: str):
|
|||
except (KeyError, AttributeError):
|
||||
prometheus_group = None
|
||||
try:
|
||||
prometheus_additional_labels = config_dict["prometheus"]["additional_labels"]
|
||||
prometheus_additional_labels = config_dict["prometheus"][
|
||||
"additional_labels"
|
||||
]
|
||||
except (KeyError, AttributeError):
|
||||
prometheus_additional_labels = None
|
||||
|
||||
|
@ -354,7 +356,9 @@ class NPBackupRunner:
|
|||
exclude_caches = False
|
||||
try:
|
||||
one_file_system = (
|
||||
self.config_dict["backup"]["one_file_system"] if os.name != "nt" else False
|
||||
self.config_dict["backup"]["one_file_system"]
|
||||
if os.name != "nt"
|
||||
else False
|
||||
)
|
||||
except KeyError:
|
||||
one_file_system = False
|
||||
|
|
|
@ -324,8 +324,8 @@ if __name__ == "__main__":
|
|||
destination_file = os.path.join(destination_dir, output_filename)
|
||||
try:
|
||||
with open(log_file, "r") as file_handle:
|
||||
errors, metrics = restic_output_2_metrics(True,
|
||||
output=file_handle.readlines(), labels=labels
|
||||
errors, metrics = restic_output_2_metrics(
|
||||
True, output=file_handle.readlines(), labels=labels
|
||||
)
|
||||
if errors:
|
||||
logger.error("Script finished with errors.")
|
||||
|
|
Loading…
Add table
Reference in a new issue