Merge lp:~jaywink/ubuntu-accomplishments-daemon/daemon-fix-1011903 into lp:ubuntu-accomplishments-daemon

Proposed by Jason Robinson
Status: Merged
Merge reported by: Jono Bacon
Merged at revision: not available
Proposed branch: lp:~jaywink/ubuntu-accomplishments-daemon/daemon-fix-1011903
Merge into: lp:ubuntu-accomplishments-daemon
Diff against target: 24 lines (+14/-0)
1 file modified
accomplishments/daemon/api.py (+14/-0)
To merge this branch: bzr merge lp:~jaywink/ubuntu-accomplishments-daemon/daemon-fix-1011903
Reviewer Review Type Date Requested Status
Jono Bacon Approve
Review via email: mp+117774@code.launchpad.net

Description of the change

Fixed by adding a restart to the Ubuntu One SyncDaemonTool to reload its config. Change reflects to U1 client control panel.

Hopefully this resolves the issue and enhances user experience.

Ps. The bug was about the viewer but the code change really suited the daemon better.

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

Wonderful contribution, Jason!

This looks and works great. Thanks for contributing, and we look forward to seeing more contributions from you! :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'accomplishments/daemon/api.py'
2--- accomplishments/daemon/api.py 2012-07-31 18:00:04 +0000
3+++ accomplishments/daemon/api.py 2012-08-01 20:03:18 +0000
4@@ -1674,6 +1674,20 @@
5
6 with open(cfile, 'wb') as configfile:
7 config.write(configfile)
8+
9+ # restart SyncDaemonTool to use new settings immediately, fixes LP#1011903
10+ self.ubuntuone_restart_syncdaemontool()
11+
12+ def ubuntuone_restart_syncdaemontool(self):
13+ if self.sd:
14+ log.msg("Stopping syncdaemontool")
15+ d = self.sd.quit()
16+ d.addCallback(self.ubuntuone_start_syncdaemontool)
17+
18+ def ubuntuone_start_syncdaemontool(self, value):
19+ if self.sd:
20+ log.msg("Starting syncdaemontool")
21+ self.sd.start()
22
23 def get_block_ubuntuone_notification_bubbles(self):
24 u1configdir = os.path.join(

Subscribers

People subscribed via source and target branches