Prefixing more hacks with HACK to make it easier to remove later
authorEd Page <eopage@byu.net>
Wed, 6 Jan 2010 02:41:45 +0000 (20:41 -0600)
committerEd Page <eopage@byu.net>
Wed, 6 Jan 2010 02:41:45 +0000 (20:41 -0600)
src/channel/call.py
src/channel/contact_list.py
src/channel/text.py
src/channel_manager.py
src/connection.py

index 19837dc..abe820f 100644 (file)
@@ -20,10 +20,10 @@ class CallChannel(
                self._props = props
 
                try:
                self._props = props
 
                try:
-                       # Older python-telepathy way
+                       # HACK Older python-telepathy way
                        telepathy.server.ChannelTypeStreamedMedia.__init__(self, connection, None)
                except TypeError:
                        telepathy.server.ChannelTypeStreamedMedia.__init__(self, connection, None)
                except TypeError:
-                       # Newer python-telepathy way
+                       # HACK Newer python-telepathy way
                        telepathy.server.ChannelTypeStreamedMedia.__init__(self, connection, manager, props)
                telepathy.server.ChannelInterfaceCallState.__init__(self)
                telepathy.server.ChannelInterfaceGroup.__init__(self)
                        telepathy.server.ChannelTypeStreamedMedia.__init__(self, connection, manager, props)
                telepathy.server.ChannelInterfaceCallState.__init__(self)
                telepathy.server.ChannelInterfaceGroup.__init__(self)
@@ -49,7 +49,7 @@ class CallChannel(
        def close(self):
                telepathy.server.ChannelTypeStreamedMedia.Close(self)
                if self._manager.channel_exists(self._props):
        def close(self):
                telepathy.server.ChannelTypeStreamedMedia.Close(self)
                if self._manager.channel_exists(self._props):
-                       # Older python-telepathy requires doing this manually
+                       # HACK Older python-telepathy requires doing this manually
                        self._manager.remove_channel(self)
                self.remove_from_connection()
 
                        self._manager.remove_channel(self)
                self.remove_from_connection()
 
index 111ae2a..aa5ccc9 100644 (file)
@@ -22,10 +22,10 @@ class AbstractListChannel(
                self._props = props
 
                try:
                self._props = props
 
                try:
-                       # Older python-telepathy way
+                       # HACK Older python-telepathy way
                        telepathy.server.ChannelTypeContactList.__init__(self, connection, h)
                except TypeError:
                        telepathy.server.ChannelTypeContactList.__init__(self, connection, h)
                except TypeError:
-                       # Newer python-telepathy way
+                       # HACK Newer python-telepathy way
                        telepathy.server.ChannelTypeContactList.__init__(self, connection, manager, props)
                telepathy.server.ChannelInterfaceGroup.__init__(self)
 
                        telepathy.server.ChannelTypeContactList.__init__(self, connection, manager, props)
                telepathy.server.ChannelInterfaceGroup.__init__(self)
 
@@ -67,7 +67,7 @@ class AllContactsListChannel(AbstractListChannel):
 
                telepathy.server.ChannelTypeContactList.Close(self)
                if self._manager.channel_exists(self._props):
 
                telepathy.server.ChannelTypeContactList.Close(self)
                if self._manager.channel_exists(self._props):
-                       # Older python-telepathy requires doing this manually
+                       # HACK Older python-telepathy requires doing this manually
                        self._manager.remove_channel(self)
                self.remove_from_connection()
 
                        self._manager.remove_channel(self)
                self.remove_from_connection()
 
index 31aa4e3..d2c5313 100644 (file)
@@ -22,10 +22,10 @@ class TextChannel(telepathy.server.ChannelTypeText):
                self._props = props
 
                try:
                self._props = props
 
                try:
-                       # Older python-telepathy way
+                       # HACK Older python-telepathy way
                        telepathy.server.ChannelTypeText.__init__(self, connection, contactHandle)
                except TypeError:
                        telepathy.server.ChannelTypeText.__init__(self, connection, contactHandle)
                except TypeError:
-                       # Newer python-telepathy way
+                       # HACK Newer python-telepathy way
                        telepathy.server.ChannelTypeText.__init__(self, connection, manager, props)
                self._nextRecievedId = 0
                self._lastMessageTimestamp = datetime.datetime(1, 1, 1)
                        telepathy.server.ChannelTypeText.__init__(self, connection, manager, props)
                self._nextRecievedId = 0
                self._lastMessageTimestamp = datetime.datetime(1, 1, 1)
@@ -72,7 +72,7 @@ class TextChannel(telepathy.server.ChannelTypeText):
 
                telepathy.server.ChannelTypeText.Close(self)
                if self._manager.channel_exists(self._props):
 
                telepathy.server.ChannelTypeText.Close(self)
                if self._manager.channel_exists(self._props):
-                       # Older python-telepathy requires doing this manually
+                       # HACK Older python-telepathy requires doing this manually
                        self._manager.remove_channel(self)
                self.remove_from_connection()
 
                        self._manager.remove_channel(self)
                self.remove_from_connection()
 
index efcf16d..4f289dd 100644 (file)
@@ -65,10 +65,10 @@ class TelepathyChannelManager(object):
                chan = self._requestable_channel_classes[type](props, **args)
 
                if hasattr(self._conn, "add_channels"):
                chan = self._requestable_channel_classes[type](props, **args)
 
                if hasattr(self._conn, "add_channels"):
-                       # Newer python-telepathy
+                       # HACK Newer python-telepathy
                        self._conn.add_channels([chan], signal=signal)
                elif hasattr(self._conn, "add_channel"):
                        self._conn.add_channels([chan], signal=signal)
                elif hasattr(self._conn, "add_channel"):
-                       # Older python-telepathy
+                       # HACK Older python-telepathy
                        self._conn.add_channel(chan, handle, suppress_handler)
                else:
                        raise RuntimeError("Uhh, what just happened with the connection")
                        self._conn.add_channel(chan, handle, suppress_handler)
                else:
                        raise RuntimeError("Uhh, what just happened with the connection")
index 75c5a83..475f1aa 100644 (file)
@@ -187,7 +187,7 @@ class TheOneRingConnection(
                h = self.handle(handleType, handleId) if handleId != 0 else None
                props = self._generate_props(type, h, suppressHandler)
                if hasattr(self, "_validate_handle"):
                h = self.handle(handleType, handleId) if handleId != 0 else None
                props = self._generate_props(type, h, suppressHandler)
                if hasattr(self, "_validate_handle"):
-                       # On newer python-telepathy
+                       # HACK Newer python-telepathy
                        self._validate_handle(props)
 
                chan = self._channelManager.channel_for_props(props, signal=True)
                        self._validate_handle(props)
 
                chan = self._channelManager.channel_for_props(props, signal=True)