summaryrefslogtreecommitdiffstats
path: root/library/python/testing
diff options
context:
space:
mode:
Diffstat (limited to 'library/python/testing')
-rw-r--r--library/python/testing/recipe/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/library/python/testing/recipe/__init__.py b/library/python/testing/recipe/__init__.py
index 539001249f4..4b99979a290 100644
--- a/library/python/testing/recipe/__init__.py
+++ b/library/python/testing/recipe/__init__.py
@@ -91,8 +91,7 @@ def tty():
if os.isatty(1):
return
- f = open('/dev/tty', 'w+')
- fd = f.fileno()
+ fd = os.open('/dev/tty', os.O_RDWR | os.O_NOCTTY)
os.dup2(fd, 0)
os.dup2(fd, 1)
os.dup2(fd, 2)