summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2012-03-22 19:18:42 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2012-03-22 19:18:42 +0100
commit9106db6e2791eb974aadf5382be2257691990c47 (patch)
tree98636ed56b717509d950fcf4baf5b0ea529762f2
parentc353232128bb862f6222be7774fd32a6f4d591be (diff)
imdb_search: Fixed error when rating is missing.
-rw-r--r--modules/imdb_search.py2
1 files changed, 1 insertions, 1 deletions
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.')