Fix passing back results from Background window

This commit is contained in:
croneter 2018-10-02 07:37:31 +02:00
parent 3045ecbccd
commit 504044b283
2 changed files with 4 additions and 4 deletions

View file

@ -356,7 +356,7 @@ def _authorize():
if pinLoginWindow.abort:
util.DEBUG_LOG('SIGN IN: Pin login aborted')
pl.abort()
return None
return
xbmc.sleep(100)
else:
if not pl.expired():
@ -364,7 +364,7 @@ def _authorize():
pinLoginWindow.setLinking()
return pl.authenticationToken
else:
return None
return
finally:
pinLoginWindow.doClose()
del pinLoginWindow
@ -375,7 +375,7 @@ def _authorize():
try:
if not expiredWindow.refresh:
util.DEBUG_LOG('SIGN IN: Pin refresh aborted')
return None
return
finally:
del expiredWindow
finally:

View file

@ -61,8 +61,8 @@ class BackgroundContext(object):
def __enter__(self):
self.window = BackgroundWindow.create(function=self.function)
self.window.modal()
self.result = self.window.result
return self
def __exit__(self, exc_type, exc_val, exc_tb):
self.result = self.window.result
del self.window