Don't spit out Python love when wrong arguments are given, better
[mirror/userdir-ldap.git] / ud-info
diff --git a/ud-info b/ud-info
index 3c8a639..3591161 100755 (executable)
--- a/ud-info
+++ b/ud-info
@@ -39,11 +39,12 @@ AttrInfo = {"cn": ["First Name", 101],
            "emailForward": ["Email Forwarding",8],
            "ircNick": ["IRC Nickname",9],
            "onVacation": ["Vacation Message",10],
-           "labledURI": ["Home Page",11],
+           "labeledURI": ["Home Page",11],
            "latitude": ["Latitude",12],
            "longitude": ["Longitude",13],
            "icqUin": ["ICQ UIN",14],
-           "privateSub": ["Debian-Private",15],
+           "jabberJID": ["Jabber ID",15],
+           "privateSub": ["Debian-Private",16],
            "comment": ["Comment",116],
            "userPassword": ["Crypted Password",117],
             "dnsZoneEntry": ["d.net Entry",118]};
@@ -70,7 +71,8 @@ AttrPrompt = {"cn": ["Common name or first name"],
              "latitude": ["XEarth latitude in ISO 6709 format - see /usr/share/zoneinfo/zone.tab or etak.com"],
              "longitude": ["XEarth latitude in ISO 6709 format - see /usr/share/zoneinfo/zone.tab or etak.com"],
              "dnsZoneEntry": ["DNS Zone fragment associated this this user"],
-              "labledURI": ["Web home page"],
+              "labeledURI": ["Web home page"],
+              "jabberJID": ["Jabber ID"],
               "icqUin": ["ICQ UIN Number"]};
 
 # Create a map of IDs to desc,value,attr
@@ -242,7 +244,12 @@ def MultiChangeAttr(Attrs,Attr):
 User = pwd.getpwuid(os.getuid())[0];
 BindUser = User;
 # Process options
-(options, arguments) = getopt.getopt(sys.argv[1:], "nu:c:a:r")
+try:
+   (options, arguments) = getopt.getopt(sys.argv[1:], "nu:c:a:r")
+except getopt.GetoptError, data:
+   print data
+   sys.exit(1)
+
 for (switch, val) in options:
    if (switch == '-u'):
       User = val;