def getInfoByTMDBId(self, id = None): cache_key = 'tmdb.cache.%s' % id result = self.getCache(cache_key) if not result: result = {} movie = None try: log.debug('Getting info: %s', cache_key) movie = tmdb.getMovieInfo(id = id) except: pass if movie: result = self.parseMovie(movie) self.setCache(cache_key, result) return result