From e850746c3b027044b4841cb9912ffac4750f2c4f Mon Sep 17 00:00:00 2001 From: markus Date: Tue, 2 Feb 2021 13:01:37 +0100 Subject: [PATCH] fix warning condition --- cara/montecarlo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cara/montecarlo.py b/cara/montecarlo.py index a371f1ac..318222e3 100644 --- a/cara/montecarlo.py +++ b/cara/montecarlo.py @@ -119,7 +119,8 @@ class MCInfectedPopulation(models.Population): assert self.breathing_category is not None, \ "expiratory_activity specified as 0 (breathing) without specified 'breathing_category'" else: - print("'breathing_category' unused as 0 (breathing) was not chosen as 'expiratory_activity'") + if self.breathing_category is not None: + print("'breathing_category' unused as 0 (breathing) was not chosen as 'expiratory_activity'") if self.breathing_category is not None: csi, lamb = lognormal_parameters[self.breathing_category]