From 828b028469e90c162511be2e7439abfb7ed6eeb9 Mon Sep 17 00:00:00 2001 From: James Turk <james.p.turk@gmail.com> Date: Fri, 15 May 2009 00:07:52 -0400 Subject: [PATCH] fixed extra print and get_thread_by_url bug --- disqus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/disqus.py b/disqus.py index 3a053f7..b46f61f 100644 --- a/disqus.py +++ b/disqus.py @@ -88,7 +88,6 @@ class Forum(object): @property def api_key(self): if not self.__dict__['api_key']: - print 'fetching api_key' msg = apicall('get_forum_api_key', {'user_api_key':self.user_api_key, 'forum_id':self.id}) self.__dict__['api_key'] = msg @@ -104,7 +103,8 @@ class Forum(object): def get_thread_by_url(self, url): msg = apicall('get_thread_by_url', {'forum_api_key': self.api_key, 'url': url}) - return Thread(msg, self.api_key) + if msg: + return Thread(msg, self.api_key) def thread_by_identifier(self, title, identifier): msg = apicall('thread_by_identifier', {'forum_api_key': self.api_key, 'title': title, 'identifier': identifier}, 'POST')