From: Joey Schulze Date: Sun, 14 Dec 2008 01:56:40 +0000 (+0100) Subject: Adjust boolean value detection code to use upper case letters in the X-Git-Tag: userdir-ldap-0.3.55 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=b7bd5e0fd1dd4eb6a8f6f8b79f53dae09720f109 Adjust boolean value detection code to use upper case letters in the end. Enable it for all three boolean attributes. Widen tabular display by one character so the description fits again. Finalise new changelog entry. --- diff --git a/debian/changelog b/debian/changelog index 3b1d0a8..d444941 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +userdir-ldap (0.3.55) unstable; urgency=low + + [ Joey Schulze ] + * Adjust boolean value detection code to use upper case letters in the + end. Enable it for all three boolean attributes. Widen tabular + display by one character so the description fits again. + [ Martin Zobel-Helas ] + * Copy new mailSpamOptOut to debianDeveloper accounts as well + + -- Joey Schulze Sun, 14 Dec 2008 02:55:41 +0100 + userdir-ldap (0.3.54) unstable; urgency=low [ Martin Zobel-Helas ] diff --git a/ud-info b/ud-info index c5a45ea..8842e05 100755 --- a/ud-info +++ b/ud-info @@ -219,7 +219,7 @@ def ShowAttrs(Attrs): Keys.sort(); for at in Keys: if at < 100 or RootMode != 0: - print " %3u) %-18s: " % (at,OrderedIndex[at][0]), + print " %3u) %-19s: " % (at,OrderedIndex[at][0]), for x in OrderedIndex[at][1]: print "'%s'" % (re.sub('[\n\r]','?',x)), print; @@ -252,13 +252,15 @@ def ChangeAttr(Attrs,Attr): Attrs[1][Attr] = [""]; return; - if (Attr == "mailSpamOptOut" and NewValue != "true" and NewValue != "false"): - if (NewValue == "1"): NewValue = "true" - else: - if (NewValue == "0"): NewValue = "false" + if (Attr == "mailSpamOptOut" or Attr == "mailGreylisting" or Attr == "mailCallout"): + if (NewValue.lower() != "true" and NewValue.lower() != "false"): + if (NewValue == "1"): NewValue = "true" else: - print "Need a boolean value" - return + if (NewValue == "0"): NewValue = "false" + else: + print "Need a boolean value" + return + NewValue = NewValue.upper() # Set a new value print "Setting.",;