Stop using string exceptions. They were removed in python 2.6.
[mirror/userdir-ldap.git] / misc / ud-update-sudopasswords
index c5585b8..441acb8 100755 (executable)
@@ -34,7 +34,7 @@ l.simple_bind_s("uid="+Pass[0]+","+BaseDn,Pass[1])
 
 PasswdAttrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"sudoPassword=*", ["uid","sudoPassword"])
 if PasswdAttrs == None:
-  raise "No Users"
+  raise Exception("No Users")
 
 for x in PasswdAttrs:
    if not x[1].has_key('sudoPassword'):