summaryrefslogtreecommitdiffstats
path: root/pykolab/utils.py
diff options
context:
space:
mode:
authorChristoph Erhardt <kolab@sicherha.de>2022-11-06 18:20:06 +0100
committerChristoph Erhardt <kolab@sicherha.de>2022-12-28 21:37:17 +0100
commitcc50d2b992d8e59be67488e2542b79797c938a4b (patch)
tree801e525aced76771780d47208e4041a80a0c89fd /pykolab/utils.py
parent0b08de125411febfeecc2bc2c62444871f5d6a65 (diff)
downloadpykolab-master.tar.gz
Fix signature of `Logger.debug()`HEADmaster
Summary: The default argument `level=1` must not come before any positional arguments; it must be accepted as a keyword argument. As signified by the pylint comments, the signature previously did not conform to the specification given in https://docs.python.org/3/library/logging.html#logging.Logger.debug. This commit fixes a longstanding problem with crashes occurring in certain scenarios when the debug level is set to 9. One such crash could be observed from within SQLAlchemy, which calls `debug()` in the following way: `pool.logger.debug("Created new connection %r", connection)` That call caused pykolab's `Logger.debug()` method to interpret its second argument as a numeric `level`, which resulted in a `TypeError` because it was actually an `sqlite3.Connection`. By accepting `level` as a keyword argument, all arguments are now interpreted in the correct order. Reviewers: mollekopf, sicherha Reviewed By: sicherha Subscribers: ghane Differential Revision: https://git.kolab.org/D3944
Diffstat (limited to 'pykolab/utils.py')
0 files changed, 0 insertions, 0 deletions