Message4801

Author Christof
Recipients Christof
Date 2009-06-06.20:28:36
SpamBayes Score 1.5709656e-14
Marked as misclassified No
Message-id <1244320117.89.0.632349321112.issue1369@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2009-06-06 20:28:38Christofsetrecipients: + Christof
2009-06-06 20:28:37Christofsetmessageid: <1244320117.89.0.632349321112.issue1369@psf.upfronthosting.co.za>
2009-06-06 20:28:37Christoflinkissue1369 messages
2009-06-06 20:28:37Christofcreate