Skip to content

Commit

Permalink
Handle attribute errors in [pts.session_manager] (invalid/corrupt ses…
Browse files Browse the repository at this point in the history
…sions)
  • Loading branch information
fuzeman committed Feb 22, 2015
1 parent 1cb40e2 commit d6c5188
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Trakttv.bundle/Contents/Code/pts/session_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ def check_sessions(self):
return

for key, ws in sessions:
self.check_paused(ws)
if getattr(ws, 'skip', True):
continue

try:
self.check_paused(ws)
except AttributeError, ex:
log.warn("Unable to determine if session is paused, skipping invalid session - %s", ex, exc_info=True)
ws.skip = True

def check_paused(self, ws):
if not ws or ws.cur_state != 'paused' or not ws.paused_since:
Expand Down

0 comments on commit d6c5188

Please sign in to comment.