Mercurial > libervia-backend
comparison sat/stdui/ui_profile_manager.py @ 2765:378188abe941
misc: replaced all "dummy" by the more conventional and readable "__" ("_" being used for gettext)
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 11 Jan 2019 11:13:15 +0100 |
parents | 56f94936df1e |
children | 003b8b4b56a7 |
comparison
equal
deleted
inserted
replaced
2764:92af49cde255 | 2765:378188abe941 |
---|---|
89 eb_profile = profile | 89 eb_profile = profile |
90 else: | 90 else: |
91 first = False | 91 first = False |
92 eb_profile = None | 92 eb_profile = None |
93 d = self.host.memory.startSession(password, profile) | 93 d = self.host.memory.startSession(password, profile) |
94 d.addCallback(lambda dummy: {"validated": C.BOOL_TRUE}) | 94 d.addCallback(lambda __: {"validated": C.BOOL_TRUE}) |
95 d.addErrback(self._startSessionEb, first, eb_profile) | 95 d.addErrback(self._startSessionEb, first, eb_profile) |
96 return d | 96 return d |
97 | 97 |
98 def _changeXMPPPassword(self, data, profile): | 98 def _changeXMPPPassword(self, data, profile): |
99 session_data = self._sessions.profileGetUnique(profile) | 99 session_data = self._sessions.profileGetUnique(profile) |
141 def _changeXMPPPasswordCb(self, data, profile): | 141 def _changeXMPPPasswordCb(self, data, profile): |
142 xmpp_password = data[xml_tools.formEscape("xmpp_password")] | 142 xmpp_password = data[xml_tools.formEscape("xmpp_password")] |
143 d = self.host.memory.setParam( | 143 d = self.host.memory.setParam( |
144 "Password", xmpp_password, "Connection", profile_key=profile | 144 "Password", xmpp_password, "Connection", profile_key=profile |
145 ) | 145 ) |
146 d.addCallback(lambda dummy: self.host.connect(profile)) | 146 d.addCallback(lambda __: self.host.connect(profile)) |
147 d.addCallback(lambda dummy: {}) | 147 d.addCallback(lambda __: {}) |
148 d.addErrback(lambda dummy: self._changeXMPPPassword({}, profile)) | 148 d.addErrback(lambda __: self._changeXMPPPassword({}, profile)) |
149 return d | 149 return d |