From: Peter Palfrader Date: Wed, 25 Apr 2018 19:33:51 +0000 (+0200) Subject: UDLdap.py: more useful exception if our array assumptions are violated X-Git-Tag: userdir-ldap-0.3.93~15 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=2ee297273c2eebc8218595c170e62024ae5e0e61 UDLdap.py: more useful exception if our array assumptions are violated --- diff --git a/UDLdap.py b/UDLdap.py index ff47124..a12371a 100644 --- a/UDLdap.py +++ b/UDLdap.py @@ -38,7 +38,7 @@ class Account: if key in self.array_values: self.cache[key] = self.attributes[key] elif not len(self.attributes[key]) == 1: - raise ValueError('non-array value has not exactly one value') + raise ValueError, 'non-array value for %s has not exactly one value'%(key,) elif key in self.int_values: self.cache[key] = int(self.attributes[key][0]) else: diff --git a/debian/changelog b/debian/changelog index fa33604..1287727 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ userdir-ldap (0.3.93) UNRELEASED; urgency=medium [ Peter Palfrader ] * Also export a host's SSHFP records to additional dns names (sshfpHostname). + * UDLdap.py: more useful exception if our array assumptions are violated. [ Ansgar Burchardt ] * ud-mailgate: include name of unknown host in error message