]> jfr.im git - z_archive/twitter.git/commitdiff
Fix tilde fixing...
authorRouxRC <redacted>
Sat, 28 Dec 2013 17:40:50 +0000 (18:40 +0100)
committerRouxRC <redacted>
Mon, 3 Feb 2014 22:55:11 +0000 (23:55 +0100)
convert non string before replacing in it...
(follows da33e70db0a0469dd8990b1ca3e7b06445529ea2 )

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")