changeset 713:8bd63daecdbf

plugin XEP-0045: fixed incorrect exceptions name
author souliane <souliane@mailoo.org>
date Sun, 17 Nov 2013 17:02:22 +0100
parents f610864eb7a5
children ecc5a5b34ee1
files src/plugins/plugin_xep_0045.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0045.py	Sun Nov 17 16:59:12 2013 +0100
+++ b/src/plugins/plugin_xep_0045.py	Sun Nov 17 17:02:22 2013 +0100
@@ -134,7 +134,7 @@
         """Tell if a nick is currently present in a room"""
         profile = self.host.memory.getProfileName(profile)
         if not self.__check_profile(profile):
-            raise exceptions.UnknownProfileError("Unknown or disconnected profile")
+            raise exceptions.ProfileUnknownError("Unknown or disconnected profile")
         if room_jid.userhost() not in self.clients[profile].joined_rooms:
             raise UnknownRoom("This room has not been joined")
         return self.clients[profile].joined_rooms[room_jid.userhost()].inRoster(muc.User(nick))
@@ -221,7 +221,7 @@
     def nick(self, room_jid, nick, profile_key):
         profile = self.host.memory.getProfileName(profile_key)
         if not self.__check_profile(profile):
-            raise exceptions.UnknownProfileError("Unknown or disconnected profile")
+            raise exceptions.ProfileUnknownError("Unknown or disconnected profile")
         if room_jid.userhost() not in self.clients[profile].joined_rooms:
             raise UnknownRoom("This room has not been joined")
         return self.clients[profile].nick(room_jid, nick)
@@ -229,7 +229,7 @@
     def leave(self, room_jid, profile_key):
         profile = self.host.memory.getProfileName(profile_key)
         if not self.__check_profile(profile):
-            raise exceptions.UnknownProfileError("Unknown or disconnected profile")
+            raise exceptions.ProfileUnknownError("Unknown or disconnected profile")
         if room_jid.userhost() not in self.clients[profile].joined_rooms:
             raise UnknownRoom("This room has not been joined")
         return self.clients[profile].leave(room_jid)
@@ -237,7 +237,7 @@
     def subject(self, room_jid, subject, profile_key):
         profile = self.host.memory.getProfileName(profile_key)
         if not self.__check_profile(profile):
-            raise exceptions.UnknownProfileError("Unknown or disconnected profile")
+            raise exceptions.ProfileUnknownError("Unknown or disconnected profile")
         if room_jid.userhost() not in self.clients[profile].joined_rooms:
             raise UnknownRoom("This room has not been joined")
         return self.clients[profile].subject(room_jid, subject)