Message9466

Author kaneg
Recipients kaneg
Date 2015-01-30.11:28:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1422617313.18.0.797326563016.issue2263@psf.upfronthosting.co.za>
In-reply-to
Content
Code below will throw exception:
import os
a = 'C:\\Windows\\'
from java.io import File
print File(a).exists()
print os.stat(a)

The same code can work well on CPython 2.5, CPython 2.7 and Jython 2.5 except Jython 2.7b3(Java related code only for validation of the file's existence).
If the last '\\' was removed, the code will be OK in Jython 2.7b3. It seems the last '\\' was not handled well.

Since os.stat is used by plenty of functions, such as os.path.isdir, it will block lots of functions
History
Date User Action Args
2015-01-30 11:28:33kanegsetrecipients: + kaneg
2015-01-30 11:28:33kanegsetmessageid: <1422617313.18.0.797326563016.issue2263@psf.upfronthosting.co.za>
2015-01-30 11:28:32kaneglinkissue2263 messages
2015-01-30 11:28:32kanegcreate