diff options
author | Dan Winship <dwinship@redhat.com> | 2007-08-08 22:24:11 (GMT) |
---|---|---|
committer | Dan Winship <dwinship@redhat.com> | 2007-08-08 22:24:11 (GMT) |
commit | d2aba901c3f85e66ba9c5b6b5d506f472552b48b (patch) | |
tree | 620aa6948008935886e941716fd4402920b9485f /sugar/activity | |
parent | 985fe6ef358ce28d7d04f199d9a342f4a4fe0a79 (diff) |
Notice when (non-sugar) activity factories fail to launch. #1975
(still need a better shell UI for when this happens)
Diffstat (limited to 'sugar/activity')
-rw-r--r-- | sugar/activity/activityfactory.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sugar/activity/activityfactory.py b/sugar/activity/activityfactory.py index 404e5f4..b1d55eb 100644 --- a/sugar/activity/activityfactory.py +++ b/sugar/activity/activityfactory.py @@ -114,7 +114,7 @@ class ActivityCreationHandler(gobject.GObject): self._factory.create(self._activity_handle.get_dict(), timeout=120 * 1000, - reply_handler=self._no_reply_handler, + reply_handler=self._create_reply_handler, error_handler=self._create_error_handler) def get_activity_id(self): @@ -137,7 +137,10 @@ class ActivityCreationHandler(gobject.GObject): def _activate_error_handler(self, err): logging.debug("Activity activation request failed %s" % err) - def _create_reply_handler(self, xid): + def _create_reply_handler(self, xid=None): + if xid is None: + self._create_error_handler('D-Bus error') + return logging.debug("Activity created %s (%s)." % (self._activity_handle.activity_id, self._service_name)) |