use Exception instead of BaseException for bare expection

This commit is contained in:
Yuming Zhu 2020-03-02 18:27:24 +08:00
parent b3b0c8d51e
commit cf34706f04
21 changed files with 70 additions and 70 deletions

View file

@ -79,7 +79,7 @@ def safe_rmtree(path, unmount=False, strict=True):
logger.debug("Removing: %s" % path)
try:
os.remove(path)
except BaseException:
except Exception:
if strict:
raise
else: