From da12763f95358de314a5a50b84f628b473213336 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 8 May 2020 01:29:28 +0300 Subject: [PATCH] Feat: Replace outdated `os.removedirs` by `shutil.rmtree` --- mimedecode/mimedecode.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mimedecode/mimedecode.py b/mimedecode/mimedecode.py index ead1ab3..bdc44c1 100644 --- a/mimedecode/mimedecode.py +++ b/mimedecode/mimedecode.py @@ -1,6 +1,7 @@ """Decode MIME message""" import os +import shutil import subprocess import sys @@ -528,4 +529,4 @@ def open_output_file(filename): return open(fullpath, 'wb') except Exception: if create: - os.removedirs(full_dir) + shutil.rmtree(full_dir) -- 2.39.5