Issue2292
Created on 2015-03-16.13:47:22 by Arfrever, last changed 2015-03-24.03:44:14 by zyasoft.
msg9660 (view) |
Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) |
Date: 2015-03-16.13:47:21 |
|
os.readlink(non_existent_file) should raise OSError instead of returning None.
$ python2.7 -c 'import os; print(os.readlink("/non_existent_file"))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
OSError: [Errno 2] No such file or directory: '/non_existent_file'
$ jython2.7 -c 'import os; print(os.readlink("/non_existent_file"))'
None
|
msg9663 (view) |
Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) |
Date: 2015-03-16.14:18:17 |
|
OSError should be raised for any non-symlink (e.g. directory or regular file):
$ python2.7 -c 'import os; print(os.readlink("/"))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
OSError: [Errno 22] Invalid argument: '/'
$ python2.7 -c 'import os; print(os.readlink("/bin"))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
OSError: [Errno 22] Invalid argument: '/bin'
$ python2.7 -c 'import os; print(os.readlink("/bin/ls"))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
OSError: [Errno 22] Invalid argument: '/bin/ls'
$ jython2.7 -c 'import os; print(os.readlink("/"))'
None
$ jython2.7 -c 'import os; print(os.readlink("/bin"))'
None
$ jython2.7 -c 'import os; print(os.readlink("/bin/ls"))'
None
|
msg9669 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-03-17.20:59:41 |
|
Fixed as of https://hg.python.org/jython/rev/dedc704b8678, which mistakenly states that #2288 is fixed
|
|
Date |
User |
Action |
Args |
2015-03-24 03:44:14 | zyasoft | set | status: pending -> closed |
2015-03-17 20:59:55 | zyasoft | set | status: open -> pending priority: high resolution: fixed assignee: zyasoft |
2015-03-17 20:59:41 | zyasoft | set | messages:
+ msg9669 |
2015-03-16 14:18:17 | Arfrever | set | messages:
+ msg9663 title: os.readlink(non_existent_file) should raise OSError -> os.readlink(non_symlink) should raise OSError |
2015-03-16 13:47:22 | Arfrever | create | |
|