From f49dab6b33ec61d792b2bb6363239f3be288fe58 Mon Sep 17 00:00:00 2001 From: Josh Roesslein Date: Fri, 13 Nov 2009 23:14:16 -0600 Subject: [PATCH] Fix some python 2.4 issues. --- tweepy/binder.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tweepy/binder.py b/tweepy/binder.py index 2df6e54..8858ad1 100644 --- a/tweepy/binder.py +++ b/tweepy/binder.py @@ -66,7 +66,11 @@ def bind_api(path, parser, allowed_param=[], method='GET', require_auth=False, parameters = None # Build url with parameters - api_root = api.api_root if search_api is False else api.search_root + if search_api is False: + api_root = api.api_root + else: + api_root = api.search_root + if parameters: url = '%s?%s' % (api_root + path, urllib.urlencode(parameters)) else: @@ -90,7 +94,10 @@ def bind_api(path, parser, allowed_param=[], method='GET', require_auth=False, scheme = 'https://' else: scheme = 'http://' - host = api.host if search_api is False else api.search_host + if search_api is False: + host = api.host + else: + host = api.search_host # Continue attempting request until successful # or maximum number of retries is reached. -- 2.25.1