]> jfr.im git - z_archive/twitter.git/blobdiff - twitter/oauth.py
Restore Python 2.6 compatibility by restoring the old version of recv_chunk, only...
[z_archive/twitter.git] / twitter / oauth.py
index e36b04512225aa2ad30158e62f4b3afb64f5bb0c..f13ef220e6a219e43039fe086325b239e9af7461 100644 (file)
@@ -128,9 +128,9 @@ def urlencode_noplus(query):
         TILDE = '____TILDE-PYTHON-TWITTER____'
         for k,v in query:
             if type(k) is unicode: k = k.encode('utf-8')
-            k = k.replace("~", TILDE)
+            k = str(k).replace("~", TILDE)
             if type(v) is unicode: v = v.encode('utf-8')
-            v = v.replace("~", TILDE)
+            v = str(v).replace("~", TILDE)
             new_query.append((k, v))
         query = new_query
         return urlencode(query).replace(TILDE, "~").replace("+", "%20")