From 38885fbf4feabfe778882cc06ceef34ed711842c Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 4 Jul 2016 12:58:40 +0300 Subject: [PATCH] uasyncio.core: Protect another case of debug logging with "if __debug__:". --- uasyncio.core/uasyncio/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uasyncio.core/uasyncio/core.py b/uasyncio.core/uasyncio/core.py index e1a5bd2b..87d0e605 100644 --- a/uasyncio.core/uasyncio/core.py +++ b/uasyncio.core/uasyncio/core.py @@ -41,7 +41,8 @@ class EventLoop: def wait(self, delay): # Default wait implementation, to be overriden in subclasses # with IO scheduling - log.debug("Sleeping for: %s", delay) + if __debug__: + log.debug("Sleeping for: %s", delay) time.sleep(delay) def run_forever(self):