Issue1369

classification
Title: os.stat(None) should raise TypeError and not java.lang.IllegalArgumentException
Type: behaviour Severity: normal
Components: Library Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Christof, fwierzbicki, pjenvey
Priority: normal Keywords:

Created on 2009-06-06.20:28:37 by Christof, last changed 2009-12-03.22:50:53 by pjenvey.

Messages
msg4801 (view) Author: Christof (Christof) Date: 2009-06-06.20:28:36
Python
>>> os.stat(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: coercing to Unicode: need string or buffer, NoneType found

Jython
>>> os.stat(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "...\jython2.5rc3\Lib\os.py", line 478, in stat
    return stat_result.from_jnastat(_posix.stat(abs_path))
        at org.python.core.PyString.<init>(PyString.java:31)
        at org.python.core.PyString.<init>(PyString.java:38)
        at org.python.core.Py.newString(Py.java:550)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)

java.lang.IllegalArgumentException: java.lang.IllegalArgumentException:
Cannot create PyString from null!


I guess Jython should also be raising TypeError?
msg4802 (view) Author: Philip Jenvey (pjenvey) Date: 2009-06-06.20:45:14
Many other os functions besides stat suffer from this. This'll have to 
wait till 2.5.1
msg5345 (view) Author: Philip Jenvey (pjenvey) Date: 2009-12-03.22:50:52
this was fixed recently when the posix module was converted to Java
History
Date User Action Args
2009-12-03 22:50:53pjenveysetstatus: open -> closed
resolution: fixed
messages: + msg5345
2009-08-16 15:52:58fwierzbickisetnosy: + fwierzbicki
2009-06-06 20:45:14pjenveysetpriority: normal
nosy: + pjenvey
messages: + msg4802
2009-06-06 20:28:37Christofcreate