X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Ftp%2Fchannelmanager.py;h=4497c49f656f34377ee4095cd66dad22fad13308;hb=5bfb4228f1fff939aa06dfbe446cf17b5ce3ed76;hp=a2e6a27ebb7c5aff33c46e20379f957a496f1cf4;hpb=09b976df8de7c4af663797cdac386f7f329e3a09;p=theonering diff --git a/src/tp/channelmanager.py b/src/tp/channelmanager.py index a2e6a27..4497c49 100644 --- a/src/tp/channelmanager.py +++ b/src/tp/channelmanager.py @@ -1,6 +1,6 @@ # telepathy-python - Base classes defining the interfaces of the Telepathy framework # -# Copyright (C) 2009 Collabora Limited +# Copyright (C) 2009-2010 Collabora Limited # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,7 +22,6 @@ from telepathy.interfaces import (CHANNEL_INTERFACE, CHANNEL_TYPE_CONTACT_LIST) class ChannelManager(object): - def __init__(self, connection): self._conn = connection @@ -93,8 +92,7 @@ class ChannelManager(object): self._conn.add_channels([channel], signal=signal) if type in self._channels: - if handle in self._channels[type]: - self._channels[type].setdefault(handle, []).append(channel) + self._channels[type].setdefault(handle, []).append(channel) return channel @@ -116,6 +114,7 @@ class ChannelManager(object): self._available_properties[type] = available def get_requestable_channel_classes(self): + """Return all the channel types that can be created""" retval = [] for channel_type in self._requestable_channel_classes: