diff options
| author | Georg Brandl <georg@python.org> | 2009-11-09 00:37:42 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2009-11-09 00:37:42 +0100 |
| commit | 9245fa9deaa43ce228d90f6a24af4822de66af1c (patch) | |
| tree | 951fb4b9bffc7b2479eb467b885f6ccacd80be05 /sphinx/util | |
| parent | 31d98460d0ce744f6633ec736c950158f95a1f70 (diff) | |
| parent | 4e8368b5ffb6b968daa114fec655ea34bacf82af (diff) | |
| download | sphinx-9245fa9deaa43ce228d90f6a24af4822de66af1c.tar.gz | |
merge with trunk
Diffstat (limited to 'sphinx/util')
| -rw-r--r-- | sphinx/util/__init__.py | 6 |
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 |
