Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5c3a66fe
Commit
5c3a66fe
authored
Feb 16, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backed out changeset 7d2018774925
parent
8a1724bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
Lib/test/test_cgi.py
Lib/test/test_cgi.py
+2
-2
Lib/test/test_sysconfig.py
Lib/test/test_sysconfig.py
+2
-2
Tools/compiler/compile.py
Tools/compiler/compile.py
+5
-2
No files found.
Lib/test/test_cgi.py
View file @
5c3a66fe
...
...
@@ -194,9 +194,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
\
n
Testing log 2
\
n
"
)
if
os
.
path
.
exists
(
os
.
devnull
):
if
os
.
path
.
exists
(
"/dev/null"
):
cgi
.
logfp
=
None
cgi
.
logfile
=
os
.
devnull
cgi
.
logfile
=
"/dev/null"
cgi
.
initlog
(
"%s"
,
"Testing log 3"
)
cgi
.
log
(
"Testing log 4"
)
...
...
Lib/test/test_sysconfig.py
View file @
5c3a66fe
...
...
@@ -294,7 +294,7 @@ class TestSysConfig(unittest.TestCase):
if
'MACOSX_DEPLOYMENT_TARGET'
in
env
:
del
env
[
'MACOSX_DEPLOYMENT_TARGET'
]
with
open
(
os
.
devnull
,
'w'
)
as
devnull_fp
:
with
open
(
'/dev/null'
,
'w'
)
as
devnull_fp
:
p
=
subprocess
.
Popen
([
sys
.
executable
,
'-c'
,
'import sysconfig; print(sysconfig.get_platform())'
,
...
...
@@ -320,7 +320,7 @@ class TestSysConfig(unittest.TestCase):
'import sysconfig; print(sysconfig.get_platform())'
,
],
stdout
=
subprocess
.
PIPE
,
stderr
=
open
(
os
.
devnull
),
stderr
=
open
(
'/dev/null'
),
env
=
env
)
test_platform
=
p
.
communicate
()[
0
].
strip
()
test_platform
=
test_platform
.
decode
(
'utf-8'
)
...
...
Tools/compiler/compile.py
View file @
5c3a66fe
import
os
import
sys
import
getopt
...
...
@@ -17,7 +16,11 @@ def main():
VERBOSE
=
1
visitor
.
ASTVisitor
.
VERBOSE
=
visitor
.
ASTVisitor
.
VERBOSE
+
1
if
k
==
'-q'
:
sys
.
stdout
=
open
(
os
.
devnull
,
'wb'
)
if
sys
.
platform
[:
3
]
==
"win"
:
f
=
open
(
'nul'
,
'wb'
)
# /dev/null fails on Windows...
else
:
f
=
open
(
'/dev/null'
,
'wb'
)
sys
.
stdout
=
f
if
k
==
'-d'
:
DISPLAY
=
1
if
k
==
'-c'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment