WindowsError is undefined on POSIX

This commit is contained in:
Cheng Zhao 2015-07-03 14:54:32 +08:00
parent 12233d704b
commit 518ec36511

View file

@ -133,10 +133,8 @@ def make_zip(zip_file_path, files, dirs):
def rm_rf(path):
try:
shutil.rmtree(path)
except WindowsError: # pylint: disable=E0602
pass
except OSError as e:
if e.errno != errno.ENOENT:
if e.errno != errno.ENOENT and e.errno != errno.EIO:
raise