From fb5debda8ab7a9d51feb30b226e1c9f43f431f7b Mon Sep 17 00:00:00 2001 From: "a.kozhemyakin" Date: Mon, 15 Feb 2021 10:24:04 +0300 Subject: [PATCH] fix for test test_pgpro434_4 (not zero code exit) --- tests/helpers/ptrack_helpers.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/helpers/ptrack_helpers.py b/tests/helpers/ptrack_helpers.py index 623eac70..e8374c98 100644 --- a/tests/helpers/ptrack_helpers.py +++ b/tests/helpers/ptrack_helpers.py @@ -1528,23 +1528,20 @@ class ProbackupTest(object): try: if node.status() == 0: node.stop() - except: - pass - if node in self.nodes: - self.nodes.remove(node) + except Exception as e: + print("Error stop node ", e) + raise + finally: + if node in self.nodes: + self.nodes.remove(node) shutil.rmtree( os.path.join( self.tmp_path, - module_name, - fname + module_name ), ignore_errors=True ) - try: - os.rmdir(os.path.join(self.tmp_path, module_name)) - except: - pass def pgdata_content(self, pgdata, ignore_ptrack=True, exclude_dirs=None): """ return dict with directory content. "