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]
/
unmaintained
/
gpgwrapper
diff --git
a/unmaintained/gpgwrapper
b/unmaintained/gpgwrapper
index
793a524
..
108f981
100755
(executable)
--- a/
unmaintained/gpgwrapper
+++ b/
unmaintained/gpgwrapper
@@
-126,7
+126,7
@@
ErrType = EX_TEMPFAIL;
try:
# Startup the replay cache
ErrType = EX_TEMPFAIL;
try:
# Startup the replay cache
ErrType = EX_TEMPFAIL;
- if ReplayCacheFile
!=
None:
+ if ReplayCacheFile
is not
None:
ErrMsg = "Failed to initialize the replay cache:";
RC = ReplayCache(ReplayCacheFile);
RC.Clean();
ErrMsg = "Failed to initialize the replay cache:";
RC = ReplayCache(ReplayCacheFile);
RC.Clean();
@@
-145,7
+145,7
@@
try:
ErrMsg = "Unable to check the signature or the signature was invalid:";
Res = GPGCheckSig(Msg[0]);
ErrMsg = "Unable to check the signature or the signature was invalid:";
Res = GPGCheckSig(Msg[0]);
- if Res[0]
!=
None:
+ if Res[0]
is not
None:
raise Error, Res[0];
if Res[3] is None:
raise Error, Res[0];
if Res[3] is None:
@@
-164,15
+164,15
@@
try:
PlainText = Res[3];
# Check the signature against the replay cache
PlainText = Res[3];
# Check the signature against the replay cache
- if ReplayCacheFile
!=
None:
+ if ReplayCacheFile
is not
None:
ErrMsg = "The replay cache rejected your message. Check your clock!";
Rply = RC.Check(Res[1]);
ErrMsg = "The replay cache rejected your message. Check your clock!";
Rply = RC.Check(Res[1]);
- if Rply
!=
None:
+ if Rply
is not
None:
raise Error, Rply;
RC.Add(Res[1]);
# Do LDAP stuff
raise Error, Rply;
RC.Add(Res[1]);
# Do LDAP stuff
- if LDAPDn
!=
None:
+ if LDAPDn
is not
None:
CheckLDAP(Res[2][1]);
# Determine the sender address
CheckLDAP(Res[2][1]);
# Determine the sender address
@@
-195,7
+195,7
@@
try:
# Invoke the child
Child = os.popen(" ".join(arguments),"w");
Child.write(PlainText);
# Invoke the child
Child = os.popen(" ".join(arguments),"w");
Child.write(PlainText);
- if Child.close()
!=
None:
+ if Child.close()
is not
None:
raise Error, "Child gave a non-zero return code";
except:
raise Error, "Child gave a non-zero return code";
except:
@@
-219,7
+219,7
@@
except:
# Try to send the bounce
try:
# Try to send the bounce
try:
- if ErrorTemplate
!=
None:
+ if ErrorTemplate
is not
None:
ErrReply = TemplateSubst(Subst,open(ErrorTemplate,"r").read());
else:
ErrReply = "\n"+str(Subst)+"\n";
ErrReply = TemplateSubst(Subst,open(ErrorTemplate,"r").read());
else:
ErrReply = "\n"+str(Subst)+"\n";
@@
-227,7
+227,7
@@
except:
Child = os.popen("/usr/sbin/sendmail -t","w");
Child.write(ErrReplyHead);
Child.write(ErrReply);
Child = os.popen("/usr/sbin/sendmail -t","w");
Child.write(ErrReplyHead);
Child.write(ErrReply);
- if Child.close()
!=
None:
+ if Child.close()
is not
None:
raise Error, "Sendmail gave a non-zero return code";
except:
sys.exit(EX_TEMPFAIL);
raise Error, "Sendmail gave a non-zero return code";
except:
sys.exit(EX_TEMPFAIL);