generate debianhosts file for exim and possibly other uses
[mirror/userdir-ldap.git] / ud-info
diff --git a/ud-info b/ud-info
index 8bad1d3..3591161 100755 (executable)
--- a/ud-info
+++ b/ud-info
@@ -39,7 +39,7 @@ 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],
@@ -71,7 +71,7 @@ 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"]};
 
@@ -244,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;