From a56c0ef04605e12cf371651adcadd17eb86c79c4 Mon Sep 17 00:00:00 2001 From: MoritzThomasHuebner <email@moritz-huebner.de> Date: Fri, 26 Oct 2018 11:50:53 +1100 Subject: [PATCH] Catches SystemExit in case Pymultinest is not installed --- bilby/core/sampler/base_sampler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bilby/core/sampler/base_sampler.py b/bilby/core/sampler/base_sampler.py index 5cc949e17..dc3b85919 100644 --- a/bilby/core/sampler/base_sampler.py +++ b/bilby/core/sampler/base_sampler.py @@ -139,7 +139,7 @@ class Sampler(object): external_sampler_name = self.__class__.__name__.lower() try: self.external_sampler = __import__(external_sampler_name) - except ImportError: + except (ImportError, SystemExit): raise ImportError( "Sampler {} not installed on this system".format(external_sampler_name)) -- GitLab