Merge lp:~dobey/ubuntuone-client/dbus-follow-name-changes into lp:ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: Rick McBride
Approved revision: 245
Merged at revision: not available
Proposed branch: lp:~dobey/ubuntuone-client/dbus-follow-name-changes
Merge into: lp:ubuntuone-client
Diff against target: 188 lines
5 files modified
bin/ubuntuone-client-applet (+17/-9)
bin/ubuntuone-client-preferences (+10/-5)
ubuntuone/oauthdesktop/auth.py (+2/-1)
ubuntuone/syncdaemon/dbus_interface.py (+2/-1)
ubuntuone/syncdaemon/tools.py (+2/-1)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/dbus-follow-name-changes
Reviewer Review Type Date Requested Status
Rick McBride (community) Approve
John O'Brien (community) Approve
Review via email: mp+13088@code.launchpad.net

Commit message

Change dbus get_object calls to all set follow_name_owner_changes to True

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

This may or may not fix several of the dbus-related issues we've been having with syncdaemon and the applet. Using this argument reportedly fixed several issues with gwibber, but I'm not sure the same reasoning applies here. No harm in trying though, and this won't make things worse.

Revision history for this message
John O'Brien (jdobrien) :
review: Approve
Revision history for this message
Rick McBride (rmcbride) wrote :

+1

review: Approve
246. By dobey

Typo typo, why oh why did python not catch the typo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/ubuntuone-client-applet'
2--- bin/ubuntuone-client-applet 2009-10-08 13:33:23 +0000
3+++ bin/ubuntuone-client-applet 2009-10-09 20:54:12 +0000
4@@ -167,7 +167,8 @@
5 return
6
7 try:
8- client = self.__bus.get_object(DBUS_IFACE_NAME, "/")
9+ client = self.__bus.get_object(DBUS_IFACE_NAME, "/",
10+ follow_name_owner_changes=True)
11 iface = dbus.Interface(client, DBUS_IFACE_SYNC_NAME)
12 iface.connect(reply_handler=dbus_async,
13 error_handler=self.sd_dbus_error)
14@@ -184,7 +185,8 @@
15 logger.error(_("Quit Error: %s") % e.get_dbus_message())
16
17 try:
18- client = self.__bus.get_object(DBUS_IFACE_NAME, "/")
19+ client = self.__bus.get_object(DBUS_IFACE_NAME, "/",
20+ follow_name_owner_changes=True)
21 iface = dbus.Interface(client, DBUS_IFACE_SYNC_NAME)
22 iface.quit(reply_handler=dbus_async,
23 error_handler=quit_error)
24@@ -258,7 +260,8 @@
25 logger.error(_("Internal Error: %s") % e.get_dbus_message())
26
27 try:
28- client = self.__bus.get_object(DBUS_IFACE_AUTH_NAME, "/")
29+ client = self.__bus.get_object(DBUS_IFACE_AUTH_NAME, "/",
30+ follow_name_owner_changes=True)
31 iface = dbus.Interface(client, DBUS_IFACE_AUTH_NAME)
32 iface.maybe_login(OAUTH_REALM, OAUTH_CONSUMER,
33 do_login,
34@@ -273,7 +276,8 @@
35 def __start_storage_daemon_maybe(self):
36 """Start the storage daemon."""
37 try:
38- client = self.__bus.get_object(DBUS_IFACE_NAME, "/")
39+ client = self.__bus.get_object(DBUS_IFACE_NAME, "/",
40+ follow_name_owner_changes=True)
41 iface = dbus.Interface(client, DBUS_IFACE_SYNC_NAME)
42 iface.get_rootdir(reply_handler=dbus_async,
43 error_handler=self.sd_dbus_error)
44@@ -678,7 +682,7 @@
45 self.__main.check_for_token(True)
46
47 client = self.__bus.get_object(DBUS_IFACE_AUTH_NAME,
48- "/")
49+ "/", follow_name_owner_changes=True)
50 iface = dbus.Interface(client, DBUS_IFACE_AUTH_NAME)
51 iface.clear_token(OAUTH_REALM, OAUTH_CONSUMER,
52 reply_handler=token_cleared,
53@@ -750,7 +754,8 @@
54 """Method to get the rootdir from the sync daemon."""
55 # Get the managed root directory
56 try:
57- client = self.__bus.get_object(DBUS_IFACE_NAME, "/")
58+ client = self.__bus.get_object(DBUS_IFACE_NAME, "/",
59+ follow_name_owner_changes=True)
60 except DBusException:
61 return False
62
63@@ -776,7 +781,8 @@
64
65 # Now get the current status
66 try:
67- client = self.__bus.get_object(DBUS_IFACE_NAME, "/status")
68+ client = self.__bus.get_object(DBUS_IFACE_NAME, "/status",
69+ follow_name_owner_changes=True)
70 iface = dbus.Interface(client, DBUS_IFACE_STATUS_NAME)
71 iface.current_status(reply_handler=self.__status_changed,
72 error_handler=self.sd_dbus_error)
73@@ -883,7 +889,8 @@
74 logger.error(_("Quit Error: %s") % e.get_dbus_message())
75
76 try:
77- client = self.__bus.get_object(DBUS_IFACE_NAME, "/")
78+ client = self.__bus.get_object(DBUS_IFACE_NAME, "/",
79+ follow_name_owner_changes=True)
80 iface = dbus.Interface(client, DBUS_IFACE_SYNC_NAME)
81 iface.quit(reply_handler=dbus_async,
82 error_handler=quit_error)
83@@ -900,7 +907,8 @@
84 def __toggle_state(self, menuitem, data=None):
85 """Connects or disconnects the storage sync process."""
86 try:
87- client = self.__bus.get_object(DBUS_IFACE_NAME, "/")
88+ client = self.__bus.get_object(DBUS_IFACE_NAME, "/",
89+ follow_name_owner_changes=True)
90 iface = dbus.Interface(client, DBUS_IFACE_SYNC_NAME)
91 if self.__connected:
92 iface.disconnect(reply_handler=dbus_async,
93
94=== modified file 'bin/ubuntuone-client-preferences'
95--- bin/ubuntuone-client-preferences 2009-10-05 19:31:48 +0000
96+++ bin/ubuntuone-client-preferences 2009-10-09 20:54:12 +0000
97@@ -85,7 +85,8 @@
98 self.__bus = dbus.SessionBus()
99
100 try:
101- client = self.__bus.get_object(DBUS_IFACE_NAME, "/config")
102+ client = self.__bus.get_object(DBUS_IFACE_NAME, "/config",
103+ follow_name_owner_changes=True)
104 iface = dbus.Interface(client, DBUS_IFACE_CONFIG_NAME)
105 iface.get_throttling_limits(
106 reply_handler=self.__got_limits,
107@@ -155,7 +156,8 @@
108 self.dn_limit = self.dn_spin.get_value_as_int() * 1024
109
110 try:
111- client = self.__bus.get_object(DBUS_IFACE_NAME, "/config")
112+ client = self.__bus.get_object(DBUS_IFACE_NAME, "/config",
113+ follow_name_owner_changes=True)
114 iface = dbus.Interface(client, DBUS_IFACE_CONFIG_NAME)
115 iface.set_throttling_limits(self.dn_limit, self.up_limit,
116 reply_handler=dbus_async,
117@@ -188,7 +190,8 @@
118 value = menu.get_active()
119 self.config.set("ubuntuone", "show_applet", str(value))
120 try:
121- client = self.__bus.get_object(APPLET_IFACE_NAME, "/config")
122+ client = self.__bus.get_object(APPLET_IFACE_NAME, "/config",
123+ follow_name_owner_changes=True)
124 iface = dbus.Interface(client, APPLET_IFACE_CONFIG_NAME)
125 iface.set_visibility_config(value, reply_handler=dbus_async,
126 error_handler=self.__dbus_error)
127@@ -200,7 +203,8 @@
128 value = menu.get_active()
129 self.config.set("ubuntuone", "connect", str(value))
130 try:
131- client = self.__bus.get_object(APPLET_IFACE_NAME, "/config")
132+ client = self.__bus.get_object(APPLET_IFACE_NAME, "/config",
133+ follow_name_owner_changes=True)
134 iface = dbus.Interface(client, APPLET_IFACE_CONFIG_NAME)
135 iface.set_connection_config(value, reply_handler=dbus_async,
136 error_handler=self.__dbus_error)
137@@ -212,7 +216,8 @@
138 self.bw_enabled = self.limit_check.get_active()
139 self.bw_table.set_sensitive(self.bw_enabled)
140 try:
141- client = self.__bus.get_object(DBUS_IFACE_NAME, "/config")
142+ client = self.__bus.get_object(DBUS_IFACE_NAME, "/config",
143+ follow_name_owner_changes=True)
144 iface = dbus.Interface(client, DBUS_IFACE_CONFIG_NAME)
145 iface.set_throttling_limits(self.dn_limit, self.up_limit,
146 reply_handler=dbus_async,
147
148=== modified file 'ubuntuone/oauthdesktop/auth.py'
149--- ubuntuone/oauthdesktop/auth.py 2009-10-08 16:55:34 +0000
150+++ ubuntuone/oauthdesktop/auth.py 2009-10-09 20:54:12 +0000
151@@ -261,7 +261,8 @@
152 logger.debug("Checking whether we are online")
153 try:
154 nm = dbus.SystemBus().get_object('org.freedesktop.NetworkManager',
155- '/org/freedesktop/NetworkManager')
156+ '/org/freedesktop/NetworkManager',
157+ follow_name_owner_changes=True)
158 except dbus.exceptions.DBusException:
159 logger.warn("Unable to connect to NetworkManager. Trying anyway.")
160 self.acquire_access_token(description, store)
161
162=== modified file 'ubuntuone/syncdaemon/dbus_interface.py'
163--- ubuntuone/syncdaemon/dbus_interface.py 2009-09-18 18:41:10 +0000
164+++ ubuntuone/syncdaemon/dbus_interface.py 2009-10-09 20:54:12 +0000
165@@ -980,7 +980,8 @@
166 try:
167 nm = self.system_bus.get_object(
168 'org.freedesktop.NetworkManager',
169- '/org/freedesktop/NetworkManager')
170+ '/org/freedesktop/NetworkManager',
171+ follow_name_owner_changes=True)
172 except dbus.DBusException, e:
173 if e.get_dbus_name() == \
174 'org.freedesktop.DBus.Error.ServiceUnknown':
175
176=== modified file 'ubuntuone/syncdaemon/tools.py'
177--- ubuntuone/syncdaemon/tools.py 2009-07-28 20:49:30 +0000
178+++ ubuntuone/syncdaemon/tools.py 2009-10-09 20:54:12 +0000
179@@ -105,7 +105,8 @@
180 # check if the syncdaemon is running
181 # catch all errors, pylint: disable-msg=W0703
182 try:
183- self.bus.get_object(DBUS_IFACE_NAME, '/')
184+ self.bus.get_object(DBUS_IFACE_NAME, '/',
185+ follow_name_owner_changes=True)
186 self.log.debug('wait_connected: Done!')
187 d.callback(True)
188 except Exception, e:

Subscribers

People subscribed via source and target branches