summaryrefslogtreecommitdiff
path: root/sphinx/util
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-11-09 00:37:42 +0100
committerGeorg Brandl <georg@python.org>2009-11-09 00:37:42 +0100
commit9245fa9deaa43ce228d90f6a24af4822de66af1c (patch)
tree951fb4b9bffc7b2479eb467b885f6ccacd80be05 /sphinx/util
parent31d98460d0ce744f6633ec736c950158f95a1f70 (diff)
parent4e8368b5ffb6b968daa114fec655ea34bacf82af (diff)
downloadsphinx-9245fa9deaa43ce228d90f6a24af4822de66af1c.tar.gz
merge with trunk
Diffstat (limited to 'sphinx/util')
-rw-r--r--sphinx/util/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py
index 78949253..b439a7e7 100644
--- a/sphinx/util/__init__.py
+++ b/sphinx/util/__init__.py
@@ -14,6 +14,7 @@ import re
import sys
import stat
import time
+import errno
import types
import shutil
import fnmatch
@@ -70,7 +71,8 @@ def ensuredir(path):
try:
os.makedirs(path)
except OSError, err:
- if not err.errno == 17:
+ # 0 for Jython/Win32
+ if err.errno not in [0, getattr(errno, 'EEXIST', 0)]:
raise
@@ -417,7 +419,7 @@ def copyfile(source, dest):
try:
# don't do full copystat because the source may be read-only
copytimes(source, dest)
- except shutil.Error:
+ except OSError:
pass