Fix logging

This commit is contained in:
croneter 2018-10-02 07:43:34 +02:00
parent 504044b283
commit 1a55301f24

View file

@ -13,7 +13,7 @@ import requests
import xbmc import xbmc
from .plexnet import plexapp, myplex from .plexnet import plexapp, myplex
from . import util from . import util, utils
LOG = logging.getLogger('PLEX.plex') LOG = logging.getLogger('PLEX.plex')
@ -345,7 +345,8 @@ def _authorize():
pl = myplex.PinLogin() pl = myplex.PinLogin()
except requests.ConnectionError: except requests.ConnectionError:
util.ERROR() util.ERROR()
util.messageDialog(util.T(32427, 'Failed'), util.T(32449, 'Sign-in failed. Cound not connect to plex.tv')) # Could not sign in to plex.tv Try again later
utils.messageDialog(utils.lang(29999), utils.lang(39305))
return return
pinLoginWindow.setPin(pl.pin) pinLoginWindow.setPin(pl.pin)
@ -354,7 +355,7 @@ def _authorize():
pl.startTokenPolling() pl.startTokenPolling()
while not pl.finished(): while not pl.finished():
if pinLoginWindow.abort: if pinLoginWindow.abort:
util.DEBUG_LOG('SIGN IN: Pin login aborted') LOG.info('Pin login aborted')
pl.abort() pl.abort()
return return
xbmc.sleep(100) xbmc.sleep(100)
@ -370,11 +371,11 @@ def _authorize():
del pinLoginWindow del pinLoginWindow
if pl.expired(): if pl.expired():
util.DEBUG_LOG('SIGN IN: Pin expired') LOG.info('Pin expired')
expiredWindow = signin.ExpiredWindow.open() expiredWindow = signin.ExpiredWindow.open()
try: try:
if not expiredWindow.refresh: if not expiredWindow.refresh:
util.DEBUG_LOG('SIGN IN: Pin refresh aborted') LOG.info('Pin refresh aborted')
return return
finally: finally:
del expiredWindow del expiredWindow