1.1 --- a/lib/posix/io.py Wed Feb 01 16:53:34 2017 +0100
1.2 +++ b/lib/posix/io.py Wed Feb 01 17:42:42 2017 +0100
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 POSIX input/output functions.
1.6
1.7 -Copyright (C) 2016 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -72,8 +72,11 @@
1.13 'bufsize'.
1.14 """
1.15
1.16 + check_int(fd)
1.17 + check_string(mode)
1.18 +
1.19 get_using(filestream.__init__, self)(encoding, bufsize)
1.20 - self.__data__ = fdopen(fd, mode)
1.21 + self.__data__ = _fdopen(fd, mode)
1.22
1.23 # Standard streams.
1.24
1.25 @@ -111,9 +114,7 @@
1.26 'mode'.
1.27 """
1.28
1.29 - check_int(fd)
1.30 - check_string(mode)
1.31 - return _fdopen(fd, mode)
1.32 + return sysstream(fd, mode)
1.33
1.34 def fpathconf(fd, name): pass
1.35 def fstat(fd): pass