Adjust boolean value detection code to use upper case letters in the userdir-ldap-0.3.55
authorJoey Schulze <joey@infodrom.org>
Sun, 14 Dec 2008 01:56:40 +0000 (02:56 +0100)
committerJoey Schulze <joey@infodrom.org>
Sun, 14 Dec 2008 01:56:40 +0000 (02:56 +0100)
end.  Enable it for all three boolean attributes.  Widen tabular
display by one character so the description fits again.  Finalise new
changelog entry.

debian/changelog
ud-info

index 3b1d0a8..d444941 100644 (file)
@@ -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 <joey@infodrom.org>  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 (executable)
--- 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.",;