fixed temp directory cleaning problem on exit

This commit is contained in:
k4yt3x
2019-12-11 22:20:01 -05:00
parent 19e17b1a8f
commit 332055a4e5
3 changed files with 92 additions and 78 deletions

View File

@@ -13,7 +13,7 @@ __ __ _ _ ___ __ __
Name: Video2X Controller
Creator: K4YT3X
Date Created: Feb 24, 2018
Last Modified: November 15, 2019
Last Modified: December 11, 2019
Editor: BrianPetkovsek
Editor: SAT3LL
@@ -438,6 +438,10 @@ except Exception:
Avalon.error('An exception has occurred')
traceback.print_exc()
# try cleaning up temp directories
with contextlib.suppress(Exception):
upscaler.cleanup_temp_directories()
finally:
# remove Video2X cache directory
with contextlib.suppress(FileNotFoundError):