From 544c8c5dbc07a11c350111e015f4ba52d65c33b9 Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Thu, 26 Jan 2023 01:47:34 +0100 Subject: [PATCH] Fix live_output parameter that was dropped from executor --- npbackup/restic_wrapper/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/npbackup/restic_wrapper/__init__.py b/npbackup/restic_wrapper/__init__.py index 2f2021f..06b87af 100644 --- a/npbackup/restic_wrapper/__init__.py +++ b/npbackup/restic_wrapper/__init__.py @@ -32,7 +32,7 @@ class ResticRunner: repository: str, password: str, verbose: bool = False, - binary_search_paths: list = None, + binary_search_paths: List[str] = None, ) -> None: self.repository = repository self.password = password @@ -515,8 +515,11 @@ class ResticRunner: Execute forget command for given snapshot """ cmd = "forget {}".format(snapshot) - # We need live output here since server errors will not stop client from deletion atempts - result, output = self.executor(cmd, live_output=True) + # We need to be verbose here since server errors will not stop client from deletion attempts + verbose = self.verbose + self.verbose = True + result, output = self.executor(cmd): + self.verbose = verbose if result: logger.info("successfully forgot snapshot.") return True