Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/collaboration
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-02-21 23:00:50 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-02-21 23:00:50 (GMT)
commitaa2d1d42f01f87b5a0a7e533bb6a93d3720b9d1a (patch)
tree7c6a4d820e001530082045875676f44e65280203 /collaboration
parente262536e85ce5289bd5eaafa157939ed8657fdab (diff)
parent860754f7e871617df9d101a51dc64a69b742a0ba (diff)
Merge git.sugarlabs.org:~walter/turtleart/collaboration-refactoring
Conflicts: NEWS TurtleArt/talogo.py
Diffstat (limited to 'collaboration')
-rwxr-xr-xcollaboration/neighborhood.py15
-rw-r--r--collaboration/telepathyclient.py17
2 files changed, 26 insertions, 6 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/telepathyclient.py b/collaboration/telepathyclient.py
index 5491530..f3e8578 100644
--- a/collaboration/telepathyclient.py
+++ b/collaboration/telepathyclient.py
@@ -18,11 +18,15 @@ import logging
import dbus
from dbus import PROPERTIES_IFACE
-from telepathy.interfaces import CLIENT, \
- CLIENT_APPROVER, \
- CLIENT_HANDLER, \
- CLIENT_INTERFACE_REQUESTS
-from telepathy.server import DBusProperties
+try:
+ from telepathy.interfaces import CLIENT, \
+ CLIENT_APPROVER, \
+ CLIENT_HANDLER, \
+ CLIENT_INTERFACE_REQUESTS
+ from telepathy.server import DBusProperties
+ TELEPATHY_AVAILABLE = True
+except ImportError:
+ TELEPATHY_AVAILABLE = False
import dispatch
@@ -34,7 +38,10 @@ _instance = None
class TelepathyClient(dbus.service.Object, DBusProperties):
+
def __init__(self):
+ if not TELEPATHY_AVAILABLE:
+ return None
self._interfaces = set([CLIENT, CLIENT_HANDLER,
CLIENT_INTERFACE_REQUESTS, PROPERTIES_IFACE,
CLIENT_APPROVER])