diff test/test_cgi.py @ 5381:0942fe89e82e

Python 3 preparation: change "x.has_key(y)" to "y in x". (Also likewise "not in" where appropriate.) Tool-generated patch.
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 22:08:17 +0000
parents 64b05e24dbd8
children e9fb7c539a52
line wrap: on
line diff
--- a/test/test_cgi.py	Tue Jul 24 21:43:32 2018 +0000
+++ b/test/test_cgi.py	Tue Jul 24 22:08:17 2018 +0000
@@ -808,7 +808,7 @@
         # issue creation. Also delete the file afterwards
         # just tomake sure that someother test looking for
         # SENDMAILDEBUG won't trip over ours.
-        if not os.environ.has_key('SENDMAILDEBUG'):
+        if 'SENDMAILDEBUG' not in os.environ:
             os.environ['SENDMAILDEBUG'] = 'mail-test1.log'
         SENDMAILDEBUG = os.environ['SENDMAILDEBUG']
 

Roundup Issue Tracker: http://roundup-tracker.org/