Use urllib.urlencode

This commit is contained in:
Vincent Jacques
2012-02-19 10:22:41 +01:00
parent c700599040
commit 9f868e490c
+2 -2
View File
@@ -1,6 +1,7 @@
import httplib
import json
import base64
import urllib
class UnknownGithubObject( Exception ):
pass
@@ -59,8 +60,7 @@ class Requester:
if parameters is None or len( parameters ) == 0:
return url
else:
### @todo urlencode
return url + "?" + "&".join( str( key ) + "=" + str( value ) for key, value in parameters.iteritems() )
return url + "?" + urllib.urlencode( parameters )
def __strucutredFromJson( self, data ):
if len( data ) == 0: