plugin XEP-0045: fixed incorrect exceptions name
This commit is contained in:
parent
8190f82caf
commit
4ef842a213
1 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue