diff options
author | Yoshiki Shibukawa <shibukawa.yoshiki@dena.jp> | 2016-07-16 00:11:25 +0900 |
---|---|---|
committer | Yoshiki Shibukawa <shibukawa.yoshiki@dena.jp> | 2016-07-16 00:11:25 +0900 |
commit | e9f5d9666557678b9dbdbc4330cfe1c09bdafc58 (patch) | |
tree | 626c5f6a319c0397c3665ed748b3702af42c92c9 /sphinx/util/osutil.py | |
parent | 736615c18c56f91beb7525f97ed8dabacc215ec4 (diff) | |
download | sphinx-git-e9f5d9666557678b9dbdbc4330cfe1c09bdafc58.tar.gz |
fix make clean abort when build dir contains files like .DS_Store.
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 585dc6104..b416a8c1f 100644 --- a/sphinx/util/osutil.py +++ b/sphinx/util/osutil.py @@ -213,3 +213,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) |