diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-11-21 20:29:53 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-21 20:29:53 +0900 |
| commit | c4df9b5de2f57387a23ec5b28f74b5e760040dd6 (patch) | |
| tree | 74891dfa0dcf1f4ffba3c894e19e775a9347df95 /sphinx/testing/path.py | |
| parent | 45fadf7f77417ba2c43227e3a08107b63f4a27d3 (diff) | |
| parent | 77849f0ef6d80fc636f457c2d8925c4932c406c9 (diff) | |
| download | sphinx-git-c4df9b5de2f57387a23ec5b28f74b5e760040dd6.tar.gz | |
Merge pull request #5640 from jdufresne/makedirs
Simplify ensuredir() with Python3 stdlib features
Diffstat (limited to 'sphinx/testing/path.py')
| -rw-r--r-- | sphinx/testing/path.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/testing/path.py b/sphinx/testing/path.py index 78c3cb7bc..143bfd994 100644 --- a/sphinx/testing/path.py +++ b/sphinx/testing/path.py @@ -202,12 +202,12 @@ class path(text_type): """ return os.path.lexists(self) - def makedirs(self, mode=0o777): - # type: (int) -> None + def makedirs(self, mode=0o777, exist_ok=False): + # type: (int, bool) -> None """ Recursively create directories. """ - os.makedirs(self, mode) + os.makedirs(self, mode, exist_ok=exist_ok) # type: ignore def joinpath(self, *args): # type: (Any) -> path |
