Update monitor.py

fix the problem "not defined _bmessage"
This commit is contained in:
Waldek 2019-12-23 15:36:50 +01:00 committed by GitHub
parent b4023aac20
commit 77215f9a97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -643,8 +643,9 @@ class dashboard(WebSocketServerProtocol):
self.sendMessage(('b' + btemplate.render(_table=BTABLE['BRIDGES'])).encode('utf-8'))
for _message in LOGBUF:
if _message:
self.sendMessage('l' + _bmessage)
_bmessage = ('l' + _message).encode('utf-8')
self.sendMessage(_bmessage)
def onMessage(self, payload, isBinary):
if isBinary:
logging.info('Binary message received: %s bytes', len(payload))