Fix AttributeError if user enters an invalid pin code

This commit is contained in:
croneter 2019-12-08 16:31:19 +01:00
parent 9ab35b0a49
commit f9755cc39c

View file

@ -169,13 +169,13 @@ class UserSelectWindow(kodigui.BaseWindow):
utils.settings('plexToken'), utils.settings('plexToken'),
utils.settings('plex_machineIdentifier')) utils.settings('plex_machineIdentifier'))
if self.user.authToken is None: if self.user.authToken is None:
self.user = None
item.setProperty('pin', item.dataSource.title) item.setProperty('pin', item.dataSource.title)
item.setProperty('editing.pin', '') item.setProperty('editing.pin', '')
# 'Error': 'Login failed with plex.tv for user' # 'Error': 'Login failed with plex.tv for user'
utils.messageDialog(utils.lang(30135), utils.messageDialog(utils.lang(30135),
'%s %s' % (utils.lang(39229), '{}{}'.format(utils.lang(39229),
self.user.username)) self.user.username))
self.user = None
return return
self.doClose() self.doClose()