Mercurial > libervia-backend
changeset 1313:a8d7500090f6 frontends_multi_profiles
core: boolConst is used to convert a boolean value to its equivalent string constant
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 09 Feb 2015 21:39:47 +0100 |
parents | d0d5ba3b4d64 |
children | bb9c32249778 |
files | src/stdui/ui_profile_manager.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/stdui/ui_profile_manager.py Fri Feb 06 20:46:14 2015 +0100 +++ b/src/stdui/ui_profile_manager.py Mon Feb 09 21:39:47 2015 +0100 @@ -48,7 +48,7 @@ def gotProfileCipher(profile_cipher): if self.host.memory.auth_sessions.profileGetUnique(profile): # case 1: profile already authenticated - return {'validated': C.str(True)} + return {'validated': C.boolConst(True)} self.profile_ciphers[profile] = profile_cipher if 'profile_password' in data: # case 2: password is provided by the caller @@ -81,7 +81,7 @@ def getParamError(self, failure): _dialog = xml_tools.XMLUI('popup', title=D_('Error')) _dialog.addText(D_("Can't get profile parameter.")) - return {'xmlui': _dialog.toXml(), 'validated': C.str(False)} + return {'xmlui': _dialog.toXml(), 'validated': C.boolConst(False)} @defer.inlineCallbacks def _verifyPassword(self, data, profile): @@ -101,10 +101,10 @@ if not verified: _dialog = xml_tools.XMLUI('popup', title=D_('Connection error')) _dialog.addText(D_("The provided profile password doesn't match.")) - defer.returnValue({'xmlui': _dialog.toXml(), 'validated': C.str(False)}) + defer.returnValue({'xmlui': _dialog.toXml(), 'validated': C.boolConst(False)}) yield self.host.memory.newAuthSession(profile_password, profile) - defer.returnValue({'validated': C.str(True)}) + defer.returnValue({'validated': C.boolConst(True)}) def _changeXMPPPassword(self, data, profile): session_data = self._sessions.profileGetUnique(profile)