diff options
author | Pootle daemon <pootle@pootle.sugarlabs.org> | 2011-06-13 14:23:40 (GMT) |
---|---|---|
committer | Pootle daemon <pootle@pootle.sugarlabs.org> | 2011-06-13 14:23:40 (GMT) |
commit | 86e2111461fab98d8c188d50ec8bd0c72c527f73 (patch) | |
tree | 6976b1ce163cb60586011951d748177e3663e937 /collaboration | |
parent | d0bcef61b8ca9b8ef0066a891819dba950764d40 (diff) | |
parent | c9b92a2a244430c677b2e27645a23c082c6c8188 (diff) |
Merge branch 'master' of git.sugarlabs.org:turtleart/mainline
Diffstat (limited to 'collaboration')
-rwxr-xr-x | collaboration/neighborhood.py | 15 | ||||
-rw-r--r-- | collaboration/presenceservice.py | 14 | ||||
-rw-r--r-- | collaboration/telepathyclient.py | 8 |
3 files changed, 26 insertions, 11 deletions
diff --git a/collaboration/neighborhood.py b/collaboration/neighborhood.py index b587bc8..192b66f 100755 --- a/collaboration/neighborhood.py +++ b/collaboration/neighborhood.py @@ -1,8 +1,21 @@ #!/usr/bin/python +# Copyright (C) 2007, Red Hat, Inc. +# Copyright (C) 2010-11 Collabora Ltd. <http://www.collabora.co.uk/> # -# neighborhood.py +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. # +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. # +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. from functools import partial from hashlib import sha1 diff --git a/collaboration/presenceservice.py b/collaboration/presenceservice.py index 142fc4a..33caadd 100644 --- a/collaboration/presenceservice.py +++ b/collaboration/presenceservice.py @@ -95,7 +95,7 @@ class PresenceService(gobject.GObject): name = 'org.freedesktop.Telepathy.Error.NotAvailable' if e.get_dbus_name() == name: logging.debug("There's no shared activity with the id " - "%s", activity_id) + "%s" % (activity_id)) else: raise else: @@ -166,8 +166,8 @@ class PresenceService(gobject.GObject): dbus_interface=CONNECTION) return self.get_buddy(account_path, contact_ids[0]) - raise ValueError('Unknown buddy in connection %s with handle %d', - tp_conn_path, handle) + raise ValueError('Unknown buddy in connection %s with handle %d' % \ + (tp_conn_path, handle)) def get_owner(self): """Retrieves the laptop Buddy object.""" @@ -203,8 +203,8 @@ class PresenceService(gobject.GObject): properties['private'] = private if self._activity_cache is not None: - raise ValueError('Activity %s is already tracked', - activity.get_id()) + raise ValueError('Activity %s is already tracked' % \ + (activity.get_id())) connection_manager = get_connection_manager() account_path, connection = \ @@ -220,8 +220,8 @@ class PresenceService(gobject.GObject): self._activity_cache = shared_activity if shared_activity.props.joined: - raise RuntimeError('Activity %s is already shared.' % - activity.props.id) + raise RuntimeError('Activity %s is already shared.' % \ + (activity.props.id)) shared_activity.share(self.__share_activity_cb, self.__share_activity_error_cb) diff --git a/collaboration/telepathyclient.py b/collaboration/telepathyclient.py index 5491530..e00f053 100644 --- a/collaboration/telepathyclient.py +++ b/collaboration/telepathyclient.py @@ -18,10 +18,11 @@ import logging import dbus from dbus import PROPERTIES_IFACE + from telepathy.interfaces import CLIENT, \ - CLIENT_APPROVER, \ - CLIENT_HANDLER, \ - CLIENT_INTERFACE_REQUESTS + CLIENT_APPROVER, \ + CLIENT_HANDLER, \ + CLIENT_INTERFACE_REQUESTS from telepathy.server import DBusProperties import dispatch @@ -34,6 +35,7 @@ _instance = None class TelepathyClient(dbus.service.Object, DBusProperties): + def __init__(self): self._interfaces = set([CLIENT, CLIENT_HANDLER, CLIENT_INTERFACE_REQUESTS, PROPERTIES_IFACE, |