summaryrefslogtreecommitdiff
path: root/sphinx/util/osutil.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-12-15 08:58:09 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2018-12-15 09:02:55 -0800
commit49d3a3c0c14216c7d7a1138b1dfafada62b9fff0 (patch)
tree4773f3008d11b039e9ad339fb988c12c973ff5df /sphinx/util/osutil.py
parent6113261948523ef6cad74621dec10e0cbf0189c7 (diff)
downloadsphinx-git-49d3a3c0c14216c7d7a1138b1dfafada62b9fff0.tar.gz
Replace ENOENT errno checks with Python 3 FileNotFoundError
The error is more specific and self documenting. This removes the last use of sphinx.util.osutil.ENOENT, so it is now deprecated for removal. sphinx.util.osutil.EEXIST was already unused so that is deprecated as well.
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r--sphinx/util/osutil.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
index 13d4a877d..8d179d210 100644
--- a/sphinx/util/osutil.py
+++ b/sphinx/util/osutil.py
@@ -30,8 +30,8 @@ if False:
from typing import Any, Iterator, List, Tuple, Union # NOQA
# Errnos that we need.
-EEXIST = getattr(errno, 'EEXIST', 0)
-ENOENT = getattr(errno, 'ENOENT', 0)
+EEXIST = getattr(errno, 'EEXIST', 0) # RemovedInSphinx40Warning
+ENOENT = getattr(errno, 'ENOENT', 0) # RemovedInSphinx40Warning
EPIPE = getattr(errno, 'EPIPE', 0)
EINVAL = getattr(errno, 'EINVAL', 0)