Commit 03b27889 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-30265: support.unlink() don't catch any OSError (#1456)

support.unlink() now only ignores ENOENT and ENOTDIR, instead of
ignoring any OSError exception.
parent 5d7a18f3
......@@ -276,8 +276,9 @@ else:
def unlink(filename):
try:
_unlink(filename)
except OSError:
pass
except OSError as exc:
if exc.errno not in (errno.ENOENT, errno.ENOTDIR):
raise
def rmdir(dirname):
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment