summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2014-11-22 17:42:35 +0100
committerYves Fischer <yvesf-git@xapek.org>2014-11-22 17:42:35 +0100
commit30b8dea53f528d3cd90bb277a7285399bb5bbffe (patch)
tree133475dad03bc18fb0bbc65c32e11cb55466f10f
parent52d575324f40c8cead9e9132b004974fda82aefd (diff)
downloadscripts-30b8dea53f528d3cd90bb277a7285399bb5bbffe.tar.gz
scripts-30b8dea53f528d3cd90bb277a7285399bb5bbffe.zip
logging
-rwxr-xr-ximdb-lookup/imdbinfo.py4
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()