Cleaned up exceptions
authorEd Page <eopage@byu.net>
Thu, 26 Nov 2009 04:19:01 +0000 (22:19 -0600)
committerEd Page <eopage@byu.net>
Thu, 26 Nov 2009 04:19:01 +0000 (22:19 -0600)
src/channel/call.py
src/channel/text.py
src/channel_manager.py
src/connection_manager.py
src/location.py

index 313a7cc..c9a753e 100644 (file)
@@ -31,7 +31,7 @@ class CallChannel(
                """
                For org.freedesktop.Telepathy.Channel.Type.StreamedMedia
                """
-               raise telepathy.NotImplemented("Cannot remove a stream")
+               raise telepathy.errors.NotImplemented("Cannot remove a stream")
 
        @gtk_toolbox.log_exception(_moduleLogger)
        def RequestStreamDirection(self, stream, streamDirection):
@@ -41,7 +41,7 @@ class CallChannel(
                @note Since streams are short lived, not bothering to implement this
                """
                _moduleLogger.info("A request was made to change the stream direction")
-               raise telepathy.NotImplemented("Cannot change directions")
+               raise telepathy.errors.NotImplemented("Cannot change directions")
 
        @gtk_toolbox.log_exception(_moduleLogger)
        def RequestStreams(self, contact, streamTypes):
@@ -52,7 +52,7 @@ class CallChannel(
                """
                for streamType in streamTypes:
                        if streamType != telepathy.constants.MEDIA_STREAM_TYPE_AUDIO:
-                               raise telepathy.NotImplemented("Audio is the only stream type supported")
+                               raise telepathy.errors.NotImplemented("Audio is the only stream type supported")
 
                contactId, contactNumber = handle.ContactHandle.from_handle_name(contact.name)
 
index 508e341..4adc544 100644 (file)
@@ -24,7 +24,7 @@ class TextChannel(telepathy.server.ChannelTypeText):
        @gtk_toolbox.log_exception(_moduleLogger)
        def Send(self, messageType, text):
                if messageType != telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL:
-                       raise telepathy.NotImplemented("Unhandled message type: %r" % messageType)
+                       raise telepathy.errors.NotImplemented("Unhandled message type: %r" % messageType)
 
                self._conn.session.backend.send_sms(self._otherHandle.phoneNumber, text)
 
index c06288d..5f609fe 100644 (file)
@@ -30,7 +30,7 @@ class ChannelManager(object):
                        chan = self._listChannels[handle]
                except KeyError, e:
                        if handle.get_type() != telepathy.HANDLE_TYPE_LIST:
-                               raise telepathy.NotImplemented("Only server lists are allowed")
+                               raise telepathy.errors.NotImplemented("Only server lists are allowed")
                        _moduleLogger.debug("Requesting new contact list channel")
 
                        chan = channel.contact_list.create_contact_list_channel(self._connRef(), handle)
@@ -43,7 +43,7 @@ class ChannelManager(object):
                        chan = self._textChannels[handle]
                except KeyError, e:
                        if handle.get_type() != telepathy.HANDLE_TYPE_CONTACT:
-                               raise telepathy.NotImplemented("Only Contacts are allowed")
+                               raise telepathy.errors.NotImplemented("Only Contacts are allowed")
                        _moduleLogger.debug("Requesting new text channel")
 
                        chan = channel.text.TextChannel(self._connRef(), handle)
@@ -56,7 +56,7 @@ class ChannelManager(object):
                        chan = self._callChannels[handle]
                except KeyError, e:
                        if handle.get_type() != telepathy.HANDLE_TYPE_NONE:
-                               raise telepathy.NotImplemented("Using deprecated means to create a call")
+                               raise telepathy.errors.NotImplemented("Using deprecated means to create a call")
                        _moduleLogger.debug("Requesting new call channel")
 
                        chan = channel.call.CallChannel(self._connRef(), handle)
index 42153ac..16cfaf5 100644 (file)
@@ -29,7 +29,7 @@ class TheOneRingConnectionManager(telepathy.server.ConnectionManager):
                @returns the mandatory and optional parameters for creating a connection
                """
                if proto not in self._protos:
-                       raise telepathy.NotImplemented('unknown protocol %s' % proto)
+                       raise telepathy.errors.NotImplemented('unknown protocol %s' % proto)
 
                result = []
                ConnectionClass = self._protos[proto]
index 4151b9c..71868ba 100644 (file)
@@ -27,14 +27,14 @@ class LocationMixin(object):
                """
                @returns {Contact: {Location Type: Location}}
                """
-               raise telepathy.NotImplemented("Yet")
+               raise telepathy.errors.NotImplemented("Yet")
 
        @gtk_toolbox.log_exception(_moduleLogger)
        def RequestLocation(self, contact):
                """
                @returns {Location Type: Location}
                """
-               raise telepathy.NotImplemented("Yet")
+               raise telepathy.errors.NotImplemented("Yet")
 
        @gtk_toolbox.log_exception(_moduleLogger)
        def SetLocation(self, location):