WindowsError is a subclass of OSError
This commit is contained in:
parent
7288581393
commit
2717556a92
1 changed files with 2 additions and 2 deletions
|
@ -133,11 +133,11 @@ def make_zip(zip_file_path, files, dirs):
|
||||||
def rm_rf(path):
|
def rm_rf(path):
|
||||||
try:
|
try:
|
||||||
shutil.rmtree(path)
|
shutil.rmtree(path)
|
||||||
|
except WindowsError: # pylint: disable=E0602
|
||||||
|
pass
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno != errno.ENOENT:
|
if e.errno != errno.ENOENT:
|
||||||
raise
|
raise
|
||||||
except WindowsError: # pylint: disable=E0602
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def safe_unlink(path):
|
def safe_unlink(path):
|
||||||
|
|
Loading…
Reference in a new issue