diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-15 11:58:23 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-15 11:58:23 (GMT) |
commit | 85c3033670d493d17e633261793e83226a6a0f61 (patch) | |
tree | 322c4f4c779fd214926ab7bbdf04a87c46747b00 /Lib/test/test_cgi.py | |
parent | a25c542c476b84b30a7172d5b4f7e2c82330f6f4 (diff) | |
download | cpython-85c3033670d493d17e633261793e83226a6a0f61.zip cpython-85c3033670d493d17e633261793e83226a6a0f61.tar.gz cpython-85c3033670d493d17e633261793e83226a6a0f61.tar.bz2 |
Use os.devnull instead of hardcoded '/dev/null'.
Diffstat (limited to 'Lib/test/test_cgi.py')
-rw-r--r-- | Lib/test/test_cgi.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py index 86e1f3a..1127dd1 100644 --- a/Lib/test/test_cgi.py +++ b/Lib/test/test_cgi.py @@ -186,9 +186,9 @@ class CgiTests(unittest.TestCase): cgi.initlog("%s", "Testing initlog 1") cgi.log("%s", "Testing log 2") self.assertEqual(cgi.logfp.getvalue(), "Testing initlog 1\nTesting log 2\n") - if os.path.exists("/dev/null"): + if os.path.exists(os.devnull): cgi.logfp = None - cgi.logfile = "/dev/null" + cgi.logfile = os.devnull cgi.initlog("%s", "Testing log 3") self.addCleanup(cgi.closelog) cgi.log("Testing log 4") |