diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-15 12:03:11 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-15 12:03:11 (GMT) |
commit | 5fd174a78daa6f6d5a9afb7900eae4c6414ed3df (patch) | |
tree | ca400263172054a900f4c0f2940a9a2fd140b8a1 /Lib/test/test_cgi.py | |
parent | 9121fe849e14e4fbdc9a330af0d430a464f25c79 (diff) | |
parent | 56abe39052a68265cf8328bb49f412a42bd53a74 (diff) | |
download | cpython-5fd174a78daa6f6d5a9afb7900eae4c6414ed3df.zip cpython-5fd174a78daa6f6d5a9afb7900eae4c6414ed3df.tar.gz cpython-5fd174a78daa6f6d5a9afb7900eae4c6414ed3df.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 89a6e84..715bd73 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") |