GTG

Merge lp:~h-pawan/gtg/rtm_json_parsing_exception into lp:~gtg/gtg/old-trunk

Proposed by Pawan Hegde
Status: Merged
Merged at revision: 1358
Proposed branch: lp:~h-pawan/gtg/rtm_json_parsing_exception
Merge into: lp:~gtg/gtg/old-trunk
Prerequisite: lp:~h-pawan/gtg/backend_rtm_exception
Diff against target: 38 lines (+5/-4)
2 files modified
CHANGELOG (+2/-1)
GTG/backends/rtm/rtm.py (+3/-3)
To merge this branch: bzr merge lp:~h-pawan/gtg/rtm_json_parsing_exception
Reviewer Review Type Date Requested Status
Nimit Shah Pending
Review via email: mp+208925@code.launchpad.net

Commit message

Encoding errors in communication with RTM fixed.

To post a comment you must log in.
1359. By Pawan Hegde

Corrected json loading exception

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CHANGELOG'
2--- CHANGELOG 2014-03-03 16:57:03 +0000
3+++ CHANGELOG 2014-03-03 17:10:29 +0000
4@@ -15,7 +15,8 @@
5 * Fix for bug #1282955: Clicking out side the calender widget should close the widget by Sagar Ghuge
6 * Fix for bug #1033268: Mouseover String Incorrect, by Sushant Raikar
7 * Fix for bug #644993 : Automatic generation of tag color, by Atit Anand
8- * Fix for bug #1286491 : RTM sync backend fails to load, by Pawan Hegde
9+ * Fix for bug #1286491: RTM sync backend fails to load, by Pawan Hegde
10+ * Fix for bug #1286493: GTG cannot connect to RTM. Fails with "TypeError: Unicode-objects must be encoded before hashing" while trying to get frob, by Pawan Hegde
11
12 2013-11-24 Getting Things GNOME! 0.3.1
13 * Fix for bug #1024473: Have 'Show Main Window' in notification area, by Antonio Roquentin
14
15=== modified file 'GTG/backends/rtm/rtm.py'
16--- GTG/backends/rtm/rtm.py 2013-08-28 20:11:53 +0000
17+++ GTG/backends/rtm/rtm.py 2014-03-03 17:10:29 +0000
18@@ -90,7 +90,7 @@
19 def _sign(self, params):
20 "Sign the parameters with MD5 hash"
21 pairs = ''.join(['%s%s' % (k, v) for k, v in sortedItems(params)])
22- return md5(self.secret + pairs).hexdigest()
23+ return md5((self.secret + pairs).encode('utf-8')).hexdigest()
24
25 def get(self, **params):
26 "Get the XML response for the passed `params`."
27@@ -102,9 +102,9 @@
28
29 # LOG.debug("JSON response: \n%s" % json)
30 if _use_jsonlib:
31- data = dottedDict('ROOT', json.loads(json_data))
32+ data = dottedDict('ROOT', json.loads(json_data.decode('utf-8')))
33 else:
34- data = dottedJSON(json_data)
35+ data = dottedJSON(json_data.decode('utf-8'))
36 rsp = data.rsp
37
38 if rsp.stat == 'fail':

Subscribers

People subscribed via source and target branches

to status/vote changes: