]> jfr.im git - z_archive/twitter.git/commitdiff
Cleanup. Remove some Py 2.5 support. No more Py 2.5 support. Sorry.
authorMike Verdone <redacted>
Sun, 27 Mar 2011 11:59:18 +0000 (13:59 +0200)
committerMike Verdone <redacted>
Sun, 27 Mar 2011 11:59:18 +0000 (13:59 +0200)
twitter/api.py

index 069afcd17032253bc693b1ba751b6e393a226a4a..52c800edd612b561edb373dee799d3bc308497a0 100644 (file)
@@ -8,13 +8,9 @@ except ImportError:
 from twitter.twitter_globals import POST_ACTIONS
 from twitter.auth import NoAuth
 
-def _py26OrGreater():
-    import sys
-    return sys.hexversion > 0x20600f0
-
-if _py26OrGreater():
+try:
     import json
-else:
+except ImportError:
     import simplejson as json
 
 class TwitterError(Exception):
@@ -30,10 +26,10 @@ class TwitterHTTPError(TwitterError):
     HTTP error interacting with twitter.com.
     """
     def __init__(self, e, uri, format, uriparts):
-      self.e = e
-      self.uri = uri
-      self.format = format
-      self.uriparts = uriparts
+        self.e = e
+        self.uri = uri
+        self.format = format
+        self.uriparts = uriparts
 
     def __str__(self):
         return (