Fix passing back results from Background window
This commit is contained in:
parent
3045ecbccd
commit
504044b283
2 changed files with 4 additions and 4 deletions
|
@ -356,7 +356,7 @@ def _authorize():
|
||||||
if pinLoginWindow.abort:
|
if pinLoginWindow.abort:
|
||||||
util.DEBUG_LOG('SIGN IN: Pin login aborted')
|
util.DEBUG_LOG('SIGN IN: Pin login aborted')
|
||||||
pl.abort()
|
pl.abort()
|
||||||
return None
|
return
|
||||||
xbmc.sleep(100)
|
xbmc.sleep(100)
|
||||||
else:
|
else:
|
||||||
if not pl.expired():
|
if not pl.expired():
|
||||||
|
@ -364,7 +364,7 @@ def _authorize():
|
||||||
pinLoginWindow.setLinking()
|
pinLoginWindow.setLinking()
|
||||||
return pl.authenticationToken
|
return pl.authenticationToken
|
||||||
else:
|
else:
|
||||||
return None
|
return
|
||||||
finally:
|
finally:
|
||||||
pinLoginWindow.doClose()
|
pinLoginWindow.doClose()
|
||||||
del pinLoginWindow
|
del pinLoginWindow
|
||||||
|
@ -375,7 +375,7 @@ def _authorize():
|
||||||
try:
|
try:
|
||||||
if not expiredWindow.refresh:
|
if not expiredWindow.refresh:
|
||||||
util.DEBUG_LOG('SIGN IN: Pin refresh aborted')
|
util.DEBUG_LOG('SIGN IN: Pin refresh aborted')
|
||||||
return None
|
return
|
||||||
finally:
|
finally:
|
||||||
del expiredWindow
|
del expiredWindow
|
||||||
finally:
|
finally:
|
||||||
|
|
|
@ -61,8 +61,8 @@ class BackgroundContext(object):
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
self.window = BackgroundWindow.create(function=self.function)
|
self.window = BackgroundWindow.create(function=self.function)
|
||||||
self.window.modal()
|
self.window.modal()
|
||||||
|
self.result = self.window.result
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||||
self.result = self.window.result
|
|
||||||
del self.window
|
del self.window
|
||||||
|
|
Loading…
Reference in a new issue