X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=mimedecode%2Fmimedecode.py;h=c23a88fccbda20d2520a11c3d61e4d59a608a52d;hb=HEAD;hp=ead1ab38493c7e5119d8204a8731747cc534647c;hpb=5c6d3a9d9921a674883d65896bae4caadc89b789;p=mimedecode.git diff --git a/mimedecode/mimedecode.py b/mimedecode/mimedecode.py index ead1ab3..c23a88f 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,5 @@ def open_output_file(filename): return open(fullpath, 'wb') except Exception: if create: - os.removedirs(full_dir) + shutil.rmtree(full_dir) + raise