[issue5552] With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows
New submission from Antoine Pitrou pit...@free.fr: This is a potentially annoying incompatibility between platforms. Under Linux: import os print(os.device_encoding(1000)) None -- components: Interpreter Core messages: 84079 nosy: pitrou priority: normal severity: normal status: open title: With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows type: behavior versions: Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5552 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5552] With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows
Antoine Pitrou pit...@free.fr added the comment: And under Windows: print(os.device_encoding(1000)) Traceback (most recent call last): File stdin, line 1, in module OSError: [Errno 9] Bad file descriptor -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5552 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5552] With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows
Antoine Pitrou pit...@free.fr added the comment: This may be related to the following lines in posixmodule.c: if (!_PyVerify_fd(fd)) return posix_error(); -- nosy: +krisvale ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5552 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5552] With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows
Antoine Pitrou pit...@free.fr added the comment: Thanks! -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5552 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com