Use "foo is None" instead of "foo == None".
[mirror/userdir-ldap.git] / ud-useradd
index 8872507..6dd82d9 100755 (executable)
@@ -180,7 +180,7 @@ while 1:
       cn = GetAttr(Attrs[0],"cn");
       sn = GetAttr(Attrs[0],"sn");
       mn = GetAttr(Attrs[0],"mn");
-      if privsub == None or privsub == "":
+      if privsub is None or privsub == "":
          privsub = " ";
       break;
    else:
@@ -267,7 +267,7 @@ if Update == 0 or ForceMail == 1:
       CryptedPass = GPGEncrypt("Your new password is '" + Password + "'\n",\
                                "0x"+Keys[0][1],UsePGP2);
       Password = None;
-      if CryptedPass == None:
+      if CryptedPass is None:
         raise "Error","Password Encryption failed"
    else:
       Pass = HashPass(Password);