From 1c7e81b578a5a5648cbf2f9fb619bc28e4999125 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sat, 16 Nov 2019 07:59:59 -0800 Subject: [PATCH] Fixed cleanup code --- osxphotos/__init__.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/osxphotos/__init__.py b/osxphotos/__init__.py index 3229f807..ac7df57d 100644 --- a/osxphotos/__init__.py +++ b/osxphotos/__init__.py @@ -155,11 +155,7 @@ class PhotosDB: # raise e def __del__(self): - try: - self._cleanup_tmp_files() - except Exception as e: - print(f"{e}") - raise e + self._cleanup_tmp_files() def keywords_as_dict(self): """ return keywords as dict of keyword, count in reverse sorted order (descending) """ @@ -587,11 +583,7 @@ class PhotosDB: self._dbphotos[uuid]["volume"] = None # remove temporary files - try: - # logger.info("Removing temporary database file: " + tmp_db) - self._cleanup_tmp_files() - except Exception as e: - print(f"{e}") + self._cleanup_tmp_files() if _debug: pp = pprint.PrettyPrinter(indent=4)