Update alert.py

This commit is contained in:
Michael Shepanski 2017-02-26 21:09:29 -05:00 committed by GitHub
parent a4abc0e223
commit ccd3302f99

View file

@ -1,9 +1,7 @@
# -*- coding: utf-8 -*-
import json
import threading
import websocket
from plexapi import log
@ -32,9 +30,8 @@ class AlertListener(threading.Thread):
# create the websocket connection
url = self._server.url(self.key).replace('http', 'ws')
log.info('Starting AlertListener: %s', url)
self._ws = websocket.WebSocketApp(url,
on_message=self._onMessage,
on_error=self._onError)
self._ws = websocket.WebSocketApp(url, on_message=self._onMessage,
on_error=self._onError)
self._ws.run_forever()
def stop(self):