comparison src/stdui/ui_profile_manager.py @ 2090:52bd463e6fe7

core(stdui/profile manager): fixed authentication cancellation
author Goffi <goffi@goffi.org>
date Sun, 04 Dec 2016 21:35:23 +0100
parents 2daf7b4c6756
children be96beb7ca14
comparison
equal deleted inserted replaced
2089:0931b5a6213c 2090:52bd463e6fe7
65 dialog = xml_tools.XMLUI('popup', title=D_('Internal error')) 65 dialog = xml_tools.XMLUI('popup', title=D_('Internal error'))
66 dialog.addText(D_(u"Internal error: {}".format(fail))) 66 dialog.addText(D_(u"Internal error: {}".format(fail)))
67 return {'xmlui': dialog.toXml(), 'validated': C.BOOL_FALSE} 67 return {'xmlui': dialog.toXml(), 'validated': C.BOOL_FALSE}
68 68
69 def _authenticateProfile(self, data, profile): 69 def _authenticateProfile(self, data, profile):
70 if C.bool(data.get('cancelled', 'false')):
71 return {}
70 if self.host.memory.isSessionStarted(profile): 72 if self.host.memory.isSessionStarted(profile):
71 return {'validated': C.BOOL_TRUE} 73 return {'validated': C.BOOL_TRUE}
72 try: 74 try:
73 password = data[xml_tools.formEscape('profile_password')] 75 password = data[xml_tools.formEscape('profile_password')]
74 except KeyError: 76 except KeyError: