Attempt to make Python 3.2 work with fd; typo

This commit is contained in:
Doug Blank 2016-01-28 07:59:50 -05:00
parent d1af8a615f
commit 80d710da48

View File

@ -83,8 +83,8 @@ def touch(fname, mode=0o666, dir_fd=None, **kwargs):
else: else:
opened = os.open(fname, flags, mode) opened = os.open(fname, flags, mode)
with os.fdopen() as f: with os.fdopen(opened) as f:
os.utime(f.fileno(opened) if os.utime in os.supports_fd else fname, os.utime(f.fileno() if os.utime in os.supports_fd else fname,
dir_fd=None if os.supports_fd else dir_fd, **kwargs) dir_fd=None if os.supports_fd else dir_fd, **kwargs)
class DbGenericUndo(DbUndo): class DbGenericUndo(DbUndo):