From 9106db6e2791eb974aadf5382be2257691990c47 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 22 Mar 2012 19:18:42 +0100 Subject: imdb_search: Fixed error when rating is missing. --- modules/imdb_search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/imdb_search.py b/modules/imdb_search.py index 0031093..34ba6cc 100644 --- a/modules/imdb_search.py +++ b/modules/imdb_search.py @@ -22,7 +22,7 @@ class Module: if len(results): m = results[0] self.ia.update(m) - s = u'\002%s\002 (%d) %.1f/10 | %s' % (m['title'], m['year'], m['rating'], self.ia.get_imdbURL(m)) + s = u'\002%s\002 (%d) %s/10 | %s' % (m['title'], m['year'], ('%.1f' % m['rating']) if 'rating' in m else '?', self.ia.get_imdbURL(m)) self.irc.msg(target, s.encode('utf-8')) else: self.irc.msg(target, 'imdb: No results.') -- cgit v1.2.3