summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Jelten <jelten@in.tum.de>2018-04-16 18:21:23 +0200
committerAndrej Shadura <andrewsh@debian.org>2019-02-10 18:09:54 +0100
commite1a3b37366a0508d1bcb8dac95aceb090d67ca86 (patch)
tree06d7490b7b21e4ca6056c2a4666573bc831ba86e
parent5a2b16565b28c7e903e79698c46fb4ab30aa9f40 (diff)
[PATCH] fix string formatting for ldap registration message
Otherwise, errors will show up: ``` 2018-04-16 18:15:47,458 - twisted - 131 - ERROR - POST-0- Traceback (most recent call last): 2018-04-16 18:15:47,458 - twisted - 131 - ERROR - POST-0- File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit 2018-04-16 18:15:47,458 - twisted - 131 - ERROR - POST-0- msg = self.format(record) 2018-04-16 18:15:47,458 - twisted - 131 - ERROR - POST-0- File "/usr/lib/python2.7/logging/__init__.py", line 734, in format 2018-04-16 18:15:47,459 - twisted - 131 - ERROR - POST-0- return fmt.format(record) 2018-04-16 18:15:47,459 - twisted - 131 - ERROR - POST-0- File "/usr/lib/python2.7/logging/__init__.py", line 465, in format 2018-04-16 18:15:47,459 - twisted - 131 - ERROR - POST-0- record.message = record.getMessage() 2018-04-16 18:15:47,460 - twisted - 131 - ERROR - POST-0- File "/usr/lib/python2.7/logging/__init__.py", line 329, in getMessage 2018-04-16 18:15:47,460 - twisted - 131 - ERROR - POST-0- msg = msg % self.args 2018-04-16 18:15:47,460 - twisted - 131 - ERROR - POST-0- TypeError: %d format: a number is required, not str 2018-04-16 18:15:47,460 - twisted - 131 - ERROR - POST-0- Logged from file ldap_auth_provider.py, line 202 ``` Gbp-Pq: Name 0001-fix-string-formatting-for-ldap-registration-message.patch
-rw-r--r--ldap_auth_provider.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldap_auth_provider.py b/ldap_auth_provider.py
index 6e7d029..5154f7b 100644
--- a/ldap_auth_provider.py
+++ b/ldap_auth_provider.py
@@ -198,7 +198,7 @@ class LdapAuthProvider(object):
logger.info(
"Registration based on LDAP data was successful: "
- "%d: %s (%s, %)",
+ "%s: %s (%s, %s)",
user_id, localpart, name, mail
)