Message7868
Alen, the answer to your question is:
The directory "\\temp\\ddir" already exists on the machine.
As for Sphinx, it actually doesn't check raw error numbers. Previously I just shortened the code a bit. The actual code looks like this (only the relevant parts):
# -------------------------------------------------
import os
import errno
EEXIST = getattr(errno, 'EEXIST', 0)
def ensuredir(path):
"""Ensure that a path exists."""
try:
os.makedirs(path)
except OSError, err:
# 0 for Jython/Win32
if err.errno not in [0, EEXIST]:
raise
# -------------------------------------------------
Regardless of the Sphinx issue (which doesn't occur when run in Jython 2.5), in Jython 2.7 the raised exception doesn't look good:
Jython 2.7b1 (default:ac42d59644e9, Feb 9 2013, 15:24:52)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_11
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.mkdir("\\temp\\ddir")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 20047] Unknown error: 20047: '\\temp\\ddir'
While on the same machine, with the same JVM the Jython 2.5.3 exception looks like this:
Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:48:36)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_11
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.mkdir("\\temp\\ddir")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 17] File exists: '\\temp\\ddir' |
|
Date |
User |
Action |
Args |
2013-02-28 14:15:04 | dchrome | set | messageid: <1362060904.51.0.43148680707.issue2014@psf.upfronthosting.co.za> |
2013-02-28 14:15:04 | dchrome | set | recipients:
+ dchrome, fwierzbicki, amak, jeff.allen |
2013-02-28 14:15:04 | dchrome | link | issue2014 messages |
2013-02-28 14:15:04 | dchrome | create | |
|