diff options
-rw-r--r-- | Lib/asyncio/base_events.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 07d49c5..72201aa 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -614,12 +614,15 @@ class BaseEventLoop(events.AbstractEventLoop): t0 = self.time() event_list = self._selector.select(timeout) t1 = self.time() - argstr = '' if timeout is None else ' {:.3f}'.format(timeout) if t1-t0 >= 1: level = logging.INFO else: level = logging.DEBUG - logger.log(level, 'poll%s took %.3f seconds', argstr, t1-t0) + if timeout is not None: + logger.log(level, 'poll %.3f took %.3f seconds', + timeout, t1-t0) + else: + logger.log(level, 'poll took %.3f seconds', t1-t0) else: event_list = self._selector.select(timeout) self._process_events(event_list) |