From 4ef842a2131ddbff9bdb56adc0ea8a94905b9c3f Mon Sep 17 00:00:00 2001 From: souliane Date: Sun, 17 Nov 2013 17:02:22 +0100 Subject: [PATCH] plugin XEP-0045: fixed incorrect exceptions name --- src/plugins/plugin_xep_0045.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/plugin_xep_0045.py b/src/plugins/plugin_xep_0045.py index 5ea1fefe..387f342e 100755 --- a/src/plugins/plugin_xep_0045.py +++ b/src/plugins/plugin_xep_0045.py @@ -134,7 +134,7 @@ class XEP_0045(object): """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 @@ class XEP_0045(object): 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 @@ class XEP_0045(object): 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 @@ class XEP_0045(object): 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)