Fixed cleanup code
This commit is contained in:
@@ -155,11 +155,7 @@ class PhotosDB:
|
|||||||
# raise e
|
# raise e
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
try:
|
self._cleanup_tmp_files()
|
||||||
self._cleanup_tmp_files()
|
|
||||||
except Exception as e:
|
|
||||||
print(f"{e}")
|
|
||||||
raise e
|
|
||||||
|
|
||||||
def keywords_as_dict(self):
|
def keywords_as_dict(self):
|
||||||
""" return keywords as dict of keyword, count in reverse sorted order (descending) """
|
""" return keywords as dict of keyword, count in reverse sorted order (descending) """
|
||||||
@@ -587,11 +583,7 @@ class PhotosDB:
|
|||||||
self._dbphotos[uuid]["volume"] = None
|
self._dbphotos[uuid]["volume"] = None
|
||||||
|
|
||||||
# remove temporary files
|
# remove temporary files
|
||||||
try:
|
self._cleanup_tmp_files()
|
||||||
# logger.info("Removing temporary database file: " + tmp_db)
|
|
||||||
self._cleanup_tmp_files()
|
|
||||||
except Exception as e:
|
|
||||||
print(f"{e}")
|
|
||||||
|
|
||||||
if _debug:
|
if _debug:
|
||||||
pp = pprint.PrettyPrinter(indent=4)
|
pp = pprint.PrettyPrinter(indent=4)
|
||||||
|
|||||||
Reference in New Issue
Block a user