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-01-11 12:09:58 +0100
commit803d5eec269dfe158ce582aa67f1c687ceb92cab (patch)
tree5ac4d88288603f50a6ec48939fd50ac30bb6aea5
parentcec9dc487f6a833d4cc597f136c50dc7199a46ba (diff)
[PATCH] fix string formatting for ldap registration messagearchive/debian/0.1.3-2_bpo9+1
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 ``` Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk> 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
)