Merge lp:~andreagrandi/ubuntu-accomplishments-system/daemon-crash into lp:~jonobacon/ubuntu-accomplishments-system/trophyinfo

Proposed by Andrea Grandi
Status: Rejected
Rejected by: Jono Bacon
Proposed branch: lp:~andreagrandi/ubuntu-accomplishments-system/daemon-crash
Merge into: lp:~jonobacon/ubuntu-accomplishments-system/trophyinfo
Diff against target: 18 lines (+7/-1)
1 file modified
daemon/libaccomplishments-daemon/daemon.py (+7/-1)
To merge this branch: bzr merge lp:~andreagrandi/ubuntu-accomplishments-system/daemon-crash
Reviewer Review Type Date Requested Status
Jono Bacon Pending
Review via email: mp+95003@code.launchpad.net

Description of the change

Fix a crash of the Ubuntu Accomplishments System daemon that occurs when user has not configured an Ubuntu One account yet.

To post a comment you must log in.
Revision history for this message
Jono Bacon (jonobacon) wrote :

Just to let you know, Andrea, I am holding off merging this in until I have merged in Duncan's branch as his branch moves a lot of code around. I will then merge in these changes then. Thanks!

Revision history for this message
Andrea Grandi (andreagrandi) wrote :

It's ok Jono, feel free to merge it when you need it :)

Revision history for this message
Jono Bacon (jonobacon) wrote :

It looks like Duncan fixed this when he created his branch, but thanks for sharing this, Andrea!

Unmerged revisions

65. By Andrea Grandi

Daemon doesn't crash anymore if you didn't configure an Ubuntu One account.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'daemon/libaccomplishments-daemon/daemon.py'
--- daemon/libaccomplishments-daemon/daemon.py 2012-02-24 06:08:50 +0000
+++ daemon/libaccomplishments-daemon/daemon.py 2012-02-28 17:34:23 +0000
@@ -287,7 +287,13 @@
287 def verifyU1Account(self):287 def verifyU1Account(self):
288 # check if this machine has an Ubuntu One account288 # check if this machine has an Ubuntu One account
289 logging.info("Check if this machine has an Ubuntu One account...")289 logging.info("Check if this machine has an Ubuntu One account...")
290 u1email = json.loads(auth.request(url='https://one.ubuntu.com/api/account/')[1])['email']290
291 u1email = None
292
293 try:
294 u1email = json.loads(auth.request(url='https://one.ubuntu.com/api/account/')[1])['email']
295 except Exception, (msg):
296 print "WARNING: You need to configure an Ubuntu One account first!"
291297
292 if u1email is None:298 if u1email is None:
293 logging.info("...No.")299 logging.info("...No.")

Subscribers

People subscribed via source and target branches