core (xmpp): raise InternalError when a new profile Client is created while there is already one in host
This commit is contained in:
parent
e1a44cf4e4
commit
aadf9ed7e4
1 changed files with 3 additions and 0 deletions
|
|
@ -168,6 +168,9 @@ class SatXMPPEntity(object):
|
||||||
password = yield host.memory.asyncGetParamA(
|
password = yield host.memory.asyncGetParamA(
|
||||||
"Password", "Connection", profile_key=profile
|
"Password", "Connection", profile_key=profile
|
||||||
)
|
)
|
||||||
|
if profile in host.profiles:
|
||||||
|
raise exceptions.InternalError(
|
||||||
|
f"There is already a profile of name {profile} in host")
|
||||||
entity = host.profiles[profile] = cls(
|
entity = host.profiles[profile] = cls(
|
||||||
host, profile, jid.JID(host.memory.getParamA("JabberID", "Connection",
|
host, profile, jid.JID(host.memory.getParamA("JabberID", "Connection",
|
||||||
profile_key=profile)), password,
|
profile_key=profile)), password,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue