From a3ef53102d2248ff4d189e581d148352be2c61fb Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Thu, 3 Dec 2020 17:08:51 +0100 Subject: [PATCH] Fix warning message on ldap import --- cps/web.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cps/web.py b/cps/web.py index 0146e5ca..d66e27e0 100644 --- a/cps/web.py +++ b/cps/web.py @@ -386,7 +386,7 @@ def extract_user_data_from_field(user, field): if match: return match.group(1) else: - raise Exception("Could Not Parse LDAP User: %s", user) + raise Exception("Could Not Parse LDAP User: {}".format(user)) # CN=Firstname LastName,OU=Laba,OU=...,DC=...,DC=... # CN=user displayname,OU=ouname1,OU=ouname2,OU=ouname3,DC=domain,DC=domain @@ -395,7 +395,7 @@ def extract_user_identifier(user, filter): if match: dynamic_field = match.group(1) else: - raise Exception("Could Not Parse LDAP User: %s", user) + raise Exception("Could Not Parse LDAP User: {}".format(user)) return extract_user_data_from_field(user, dynamic_field)