diff src/plugins/plugin_misc_register_account.py @ 1044:85c110c0be86

plugins misc_account, misc_register_account: manually delete the sessions when not needed anymore
author souliane <souliane@mailoo.org>
date Wed, 21 May 2014 23:17:51 +0200
parents 6e975c6b0faf
children b29452cab50b
line wrap: on
line diff
--- a/src/plugins/plugin_misc_register_account.py	Wed May 21 23:15:01 2014 +0200
+++ b/src/plugins/plugin_misc_register_account.py	Wed May 21 23:17:51 2014 +0200
@@ -84,7 +84,9 @@
         self.host.memory.setParam("Port", session_data["Port"], "Connection", profile_key=profile)
 
         user = jid.parse(session_data['JabberID'])[0]
-        return self._registerNewAccount(user, session_data["Password"], None, session_data["Server"], profile_key=profile)
+        d = self._registerNewAccount(user, session_data["Password"], None, session_data["Server"], profile_key=profile)
+        del self._sessions[data['session_id']]
+        return d
 
     def _registerNewAccount(self, user, password, email, host, port=5222, profile_key=C.PROF_KEY_NONE):
         """Connect to a server and create a new account using in-band registration.