Logging is not lazy
The logging statement has the call of the form
logging.(format_string % (format_args...))
For such calls, it is recommended to leave string interpolation to the
logging method itself and be written as
logging.(format_string, format_args...)
so that the program may avoid incurring the cost of the interpolation
in those cases in which no message will be logged. For more details, see
PEP 282.
Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
if 'interval' in response:
m = int(response['interval'])
- logging.debug('Got interval of %d minutes' % m)
+ logging.debug('Got interval of %d minutes', m)
if self.interval is None or self.interval > m * 60:
self.interval = m * 60
self.tncc.get_cookie(args['Cookie'],
self.tncc.find_cookie('DSSIGNIN'))
else:
- logging.warning('Unknown command %r' % cmd)
+ logging.warning('Unknown command %r', cmd)
def fingerprint_checking_SSLSocket(_fingerprint):