# HG changeset patch # User Goffi # Date 1423514387 -3600 # Node ID a8d7500090f6a454b869e35a817ed4fc2523392a # Parent d0d5ba3b4d64a19f981a1e5486b215894f19db2a core: boolConst is used to convert a boolean value to its equivalent string constant diff -r d0d5ba3b4d64 -r a8d7500090f6 src/stdui/ui_profile_manager.py --- 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)