don't remove account from Gajim if removal from server failed
This commit is contained in:
parent
408ed03bd0
commit
995590a0f1
|
@ -2335,6 +2335,8 @@ class Connection:
|
|||
iq = common.xmpp.Iq(typ = 'set', to = hostname)
|
||||
q = iq.setTag(common.xmpp.NS_REGISTER + ' query').setTag('remove')
|
||||
self.connection.send(iq)
|
||||
return True
|
||||
return False
|
||||
|
||||
def send_invite(self, room, to, reason=''):
|
||||
'''sends invitation'''
|
||||
|
|
|
@ -2187,7 +2187,10 @@ class RemoveAccountWindow:
|
|||
# We don't remove account cause we canceled pw window
|
||||
return
|
||||
gajim.connections[self.account].password = passphrase
|
||||
gajim.connections[self.account].unregister_account()
|
||||
if not gajim.connections[self.account].unregister_account():
|
||||
# unregistration failed, we don't remove the account
|
||||
# Error message is send by connect_and_auth()
|
||||
return
|
||||
# Close all opened windows
|
||||
gajim.interface.roster.close_all(gajim.interface.instances[self.account])
|
||||
del gajim.connections[self.account]
|
||||
|
|
Loading…
Reference in New Issue