diff options
-rwxr-xr-x | imdb-lookup/imdbinfo.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/imdb-lookup/imdbinfo.py b/imdb-lookup/imdbinfo.py index b41ff62..bc9a062 100755 --- a/imdb-lookup/imdbinfo.py +++ b/imdb-lookup/imdbinfo.py @@ -34,12 +34,14 @@ def read_key(): class TMDBCache(object): def __enter__(self): + self.logger = logging.getLogger(self.__class__.__module__ + "." + self.__class__.__name__) + self.logger.info("Open db") self.db = dbm.open(self._get_db_filename("tmdbmovie.dbm"),"c") self.db_images = dbm.open(self._get_db_filename("tmdbposter.dbm"), "c") - self.logger = logging.getLogger(self.__class__.__module__ + "." + self.__class__.__name__) return self def __exit__(self, type, value, traceback): + self.logger.info("Close db") self.db.close() self.db_images.close() |