Change exception raised by DontReadFromInput.fileno() from ValueError to io.UnsupportedOperation

This commit is contained in:
Vlad Dragos 2016-09-26 13:15:35 +03:00
parent b071fdc633
commit 8985c0be3e
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ from __future__ import with_statement
import contextlib
import sys
import os
from io import UnsupportedOperation
from tempfile import TemporaryFile
import py
@ -447,7 +448,7 @@ class DontReadFromInput:
__iter__ = read
def fileno(self):
raise ValueError("redirected Stdin is pseudofile, has no fileno()")
raise UnsupportedOperation("redirected Stdin is pseudofile, has no fileno()")
def isatty(self):
return False