Python 3.4 now provides non-inheritable file handles by default

This commit is contained in:
Thomas Nagy 2013-10-21 20:58:00 +02:00
parent 0f0f36b040
commit 50737b138a
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ def h_file(fname):
f.close()
return m.digest()
if hasattr(os, 'O_NOINHERIT'):
if hasattr(os, 'O_NOINHERIT') and sys.hexversion < 0x3040000:
def readf_win32(f, m='r', encoding='ISO8859-1'):
flags = os.O_NOINHERIT | os.O_RDONLY
if 'b' in m: