diff options
author | Leif Johansson <leifj@sunet.se> | 2011-05-03 15:43:23 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2011-05-03 15:43:23 +0200 |
commit | 7a59224ad54ff5f5fe28c187c1d52fe5a1942e90 (patch) | |
tree | 0bc3df2a9a41362358eb82fa030c91a44c9d2496 /src/meetingtools/ac | |
parent | 90ec47bca6a590e9c59120d9f1d406632f3d2a64 (diff) |
damn unicode
Diffstat (limited to 'src/meetingtools/ac')
-rw-r--r-- | src/meetingtools/ac/api.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/meetingtools/ac/api.py b/src/meetingtools/ac/api.py index 62ae26c..59aa2d8 100644 --- a/src/meetingtools/ac/api.py +++ b/src/meetingtools/ac/api.py @@ -5,7 +5,7 @@ Created on Jan 31, 2011 ''' import httplib2 -from urllib import quote +from urllib import quote, urlencode import logging from pprint import pformat import os @@ -71,16 +71,11 @@ class ACPClient(): self._cache = {'login':{},'group':{}} def request(self,method,p={},raise_error=False): - url = self.url+"?"+"action=%s" % method if self.session: - url = url + "&session=%s" % self.session + p['session'] = self.session + p['action'] = method - u = [] - for (k,v) in p.items(): - if v: - kv = "%s=%s" % (k,quote(v)) - u.append(kv) - url = url + "&" + "&".join(u) + url = self.url + '?' + urlencode(p) h = httplib2.Http(tempfile.gettempdir()+os.sep+".cache"); logging.debug(url) |