diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-15 20:38:46 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-19 19:26:50 +0900 |
commit | d0f5862597c1b4fd5210433a323be6b21d99d1ee (patch) | |
tree | 44c13629c970e84c24bb9413d728a8ed75a487c1 /sphinx/util/osutil.py | |
parent | 3905cb8b7cb92815a6ee41a7d25ad2eaa5b8a443 (diff) | |
download | sphinx-git-d0f5862597c1b4fd5210433a323be6b21d99d1ee.tar.gz |
Replace EnvironmentError and IOError by OSError
Since python 3.3, EnvironmentError and IOError were merged into
OSError.
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r-- | sphinx/util/osutil.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py index c8088b384..077444f1d 100644 --- a/sphinx/util/osutil.py +++ b/sphinx/util/osutil.py @@ -29,8 +29,8 @@ if False: # Errnos that we need. EEXIST = getattr(errno, 'EEXIST', 0) # RemovedInSphinx40Warning ENOENT = getattr(errno, 'ENOENT', 0) # RemovedInSphinx40Warning -EPIPE = getattr(errno, 'EPIPE', 0) -EINVAL = getattr(errno, 'EINVAL', 0) +EPIPE = getattr(errno, 'EPIPE', 0) # RemovedInSphinx40Warning +EINVAL = getattr(errno, 'EINVAL', 0) # RemovedInSphinx40Warning # SEP separates path elements in the canonical file names # @@ -97,7 +97,7 @@ def mtimes_of_files(dirnames, suffix): if sfile.endswith(suffix): try: yield path.getmtime(path.join(root, sfile)) - except EnvironmentError: + except OSError: pass @@ -257,7 +257,7 @@ class FileAvoidWrite: old_content = old_f.read() if old_content == buf: return - except IOError: + except OSError: pass with open(self._path, 'w') as f: |