diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-07-21 00:20:25 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-07-21 00:20:25 +0900 |
commit | 80bfc55795e0543b43a4e5721ada3d44d3c856cf (patch) | |
tree | 94d776a0b8653999d0d0fb9f3cf52af27452e3ed /sphinx/util/osutil.py | |
parent | 061a4647c946e54deb160f3a0acb0848b03f0008 (diff) | |
parent | c698fab3380028ec0fe79442e87c7ac5c2effaa2 (diff) | |
download | sphinx-git-80bfc55795e0543b43a4e5721ada3d44d3c856cf.tar.gz |
Merge branch 'stable'
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r-- | sphinx/util/osutil.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py index 0de6d8472..9586306fd 100644 --- a/sphinx/util/osutil.py +++ b/sphinx/util/osutil.py @@ -217,3 +217,10 @@ def cd(target_dir): yield finally: os.chdir(cwd) + + +def rmtree(path): + if os.path.isdir(path): + shutil.rmtree(path) + else: + os.remove(path) |