Replacing %(name)s macro in default autoreply content.

see #432
This commit is contained in:
Antoine Nguyen
2013-11-22 15:13:17 +01:00
parent 4effce65c7
commit 5b302babd0
3 changed files with 16 additions and 2 deletions
+1 -1
View File
@@ -202,7 +202,7 @@ class GeneralParametersForm(parameters.AdminParametersForm):
tpl = self.cleaned_data["ldap_user_dn_template"]
try:
test = tpl % {"user": "toto"}
except ValueError:
except (KeyError, ValueError):
raise forms.ValidationError(_("Invalid syntax"))
return tpl