From 34fd266cf9e743d72603c9a73f3fff29fcb9d6e8 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Tue, 31 Jul 2018 18:19:43 +0200 Subject: [lint] Do log formating lazily Convert log("fmt" % args) to log("fmt", args) as the latter is lazy and does not do the formating if the string is never logged. --- discord/opus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'discord/opus.py') diff --git a/discord/opus.py b/discord/opus.py index 36a178a7..175867cd 100644 --- a/discord/opus.py +++ b/discord/opus.py @@ -44,14 +44,14 @@ EncoderStructPtr = ctypes.POINTER(EncoderStruct) def _err_lt(result, func, args): if result < 0: - log.info('error has happened in {0.__name__}'.format(func)) + log.info('error has happened in %s', func.__name__) raise OpusError(result) return result def _err_ne(result, func, args): ret = args[-1]._obj if ret.value != 0: - log.info('error has happened in {0.__name__}'.format(func)) + log.info('error has happened in %s', func.__name__) raise OpusError(ret.value) return result -- cgit v1.2.3