[issue32887] os: Users of path_converter don't handle fd == -1 properly

2018-02-20 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- nosy: +larry ___ Python tracker ___ ___ Python-bugs-list

[issue32887] os: Users of path_converter don't handle fd == -1 properly

2018-02-20 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : Demo: >>> import os >>> os.chdir(-1) Traceback (most recent call last): File "", line 1, in OSError: [Errno 14] Bad address: -1 >>> os.chdir(-2) Traceback (most recent call last): File "", line 1, in OSError: [Errno 9] Bad file