From f4ec25eb91a3c5d6967fffc65c8f3176e11a3ede Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 8 Sep 2014 09:18:54 +0200 Subject: [PATCH] Allow logger to be None in Python unit tests. --- tools/python/unittests/linphonetester.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/python/unittests/linphonetester.py b/tools/python/unittests/linphonetester.py index 14c1dbde5..0968e551f 100644 --- a/tools/python/unittests/linphonetester.py +++ b/tools/python/unittests/linphonetester.py @@ -392,7 +392,8 @@ class CoreManager: else: proxy_count = 0 if proxy_count: - self.logger.warning(self) + if self.logger is not None: + self.logger.warning(self) CoreManager.wait_for_until(self, None, lambda manager: manager.stats.number_of_LinphoneRegistrationOk == proxy_count, 5000 * proxy_count) assert_equals(self.stats.number_of_LinphoneRegistrationOk, proxy_count) self.enable_audio_codec("PCMU", 8000)