Show More
@@ -10,6 +10,7 b' from __future__ import print_function' | |||
|
10 | 10 | from __future__ import absolute_import |
|
11 | 11 | |
|
12 | 12 | |
|
13 | import atexit | |
|
13 | 14 | import os |
|
14 | 15 | import sys |
|
15 | 16 | import tempfile |
@@ -73,6 +74,7 b' class IOStream:' | |||
|
73 | 74 | |
|
74 | 75 | # setup stdin/stdout/stderr to sys.stdin/sys.stdout/sys.stderr |
|
75 | 76 | devnull = open(os.devnull, 'w') |
|
77 | atexit.register(devnull.close) | |
|
76 | 78 | stdin = IOStream(sys.stdin, fallback=devnull) |
|
77 | 79 | stdout = IOStream(sys.stdout, fallback=devnull) |
|
78 | 80 | stderr = IOStream(sys.stderr, fallback=devnull) |
General Comments 0
You need to be logged in to leave comments.
Login now