projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use "foo is not None" instead of "foo != None".
[mirror/userdir-ldap.git]
/
ud-useradd
diff --git
a/ud-useradd
b/ud-useradd
index
6dd82d9
..
77f71dc
100755
(executable)
--- a/
ud-useradd
+++ b/
ud-useradd
@@
-376,7
+376,7
@@
else:
(ldap.MOD_REPLACE,"shadowExpire","")];
if privsub != " ":
Rec.append((ldap.MOD_REPLACE,"privateSub",privsub));
(ldap.MOD_REPLACE,"shadowExpire","")];
if privsub != " ":
Rec.append((ldap.MOD_REPLACE,"privateSub",privsub));
- if Pass
!=
None:
+ if Pass
is not
None:
Rec.append((ldap.MOD_REPLACE,"userPassword","{crypt}"+Pass));
# Do it
l.modify_s(Dn,Rec);
Rec.append((ldap.MOD_REPLACE,"userPassword","{crypt}"+Pass));
# Do it
l.modify_s(Dn,Rec);
@@
-397,7
+397,7
@@
Reply = TemplateSubst(Subst,open(templatepath, "r").read())
Child = os.popen("/usr/sbin/sendmail -t","w");
#Child = os.popen("cat","w");
Child.write(Reply);
Child = os.popen("/usr/sbin/sendmail -t","w");
#Child = os.popen("cat","w");
Child.write(Reply);
-if Child.close()
!=
None:
+if Child.close()
is not
None:
raise Error, "Sendmail gave a non-zero return code";
# vim:set et:
raise Error, "Sendmail gave a non-zero return code";
# vim:set et: