# HG changeset patch # User souliane # Date 1384704142 -3600 # Node ID 8bd63daecdbfc20b9e1d988e12251ba3477c4abe # Parent f610864eb7a5238ec9db1f95e333100a2569cf3f plugin XEP-0045: fixed incorrect exceptions name diff -r f610864eb7a5 -r 8bd63daecdbf src/plugins/plugin_xep_0045.py --- 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)