]> git.phdru.name Git - mimedecode.git/commitdiff
Feat: Replace outdated `os.removedirs` by `shutil.rmtree`
authorOleg Broytman <phd@phdru.name>
Thu, 7 May 2020 22:29:28 +0000 (01:29 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 7 May 2020 22:29:28 +0000 (01:29 +0300)
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)