Fix some python 2.4 issues.
authorJosh Roesslein <jroesslein@gmail.com>
Sat, 14 Nov 2009 05:14:16 +0000 (23:14 -0600)
committerJosh Roesslein <jroesslein@gmail.com>
Sat, 14 Nov 2009 05:14:16 +0000 (23:14 -0600)
tweepy/binder.py

index 2df6e54d519769ac09ed0a48d65148717c072d0e..8858ad13e9e7c47ba4b28364dc1b616eb3ddb4a0 100644 (file)
@@ -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.