From 6dbe5964a197eb0ca5026e6ac0bac23bcc0c17d9 Mon Sep 17 00:00:00 2001 From: Gaute Lindkvist Date: Thu, 6 Jun 2019 13:48:59 +0200 Subject: [PATCH] Python: avoid cleanip in destructor of Instance. It doesn't work right on Linux. --- ApplicationCode/GrpcInterface/Python/rips/Instance.py | 4 ---- ApplicationCode/GrpcInterface/Python/tests/conftest.py | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ApplicationCode/GrpcInterface/Python/rips/Instance.py b/ApplicationCode/GrpcInterface/Python/rips/Instance.py index 17da837e88..a1904352ef 100644 --- a/ApplicationCode/GrpcInterface/Python/rips/Instance.py +++ b/ApplicationCode/GrpcInterface/Python/rips/Instance.py @@ -106,7 +106,3 @@ class Instance: path = os.getcwd() self.commands.setStartDir(path=path) - - def __del__(self): - if self.launched: - self.app.exit() \ No newline at end of file diff --git a/ApplicationCode/GrpcInterface/Python/tests/conftest.py b/ApplicationCode/GrpcInterface/Python/tests/conftest.py index 38ad8111c8..a862d65c69 100644 --- a/ApplicationCode/GrpcInterface/Python/tests/conftest.py +++ b/ApplicationCode/GrpcInterface/Python/tests/conftest.py @@ -33,3 +33,6 @@ def pytest_configure(config): if not _rips_instance: print("Need a valid ResInsight executable to launch tests") exit(0) + +def pytest_unconfigure(): + _rips_instance.app.exit() \ No newline at end of file