]> git.phdru.name Git - mimedecode.git/blobdiff - mimedecode/mimedecode.py
Feat: Replace outdated `os.removedirs` by `shutil.rmtree`
[mimedecode.git] / mimedecode / mimedecode.py
index ead1ab38493c7e5119d8204a8731747cc534647c..bdc44c1ed8688bbcf1ebcb5f32b03424fc16f902 100644 (file)
@@ -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)