From a35bcc3c03b2cefead6db43e58bf70846b8dcf96 Mon Sep 17 00:00:00 2001 From: Waldek Date: Tue, 18 Jun 2019 13:56:21 +0200 Subject: [PATCH] Update web_tables.py Fix problem with use BRIDGES_INC from config.py --- web_tables.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web_tables.py b/web_tables.py index 5891bf6..03a4d49 100644 --- a/web_tables.py +++ b/web_tables.py @@ -361,10 +361,10 @@ def build_stats(): global build_time now = time() if True: #now > build_time + 1: - if CONFIG and CONFIG_INC: + if CONFIG: table = 'd' + dtemplate.render(_table=CTABLE) dashboard_server.broadcast(table) - if BRIDGES and BRIDGES_INC: + if BRIDGES: table = 'b' + btemplate.render(_table=BTABLE['BRIDGES']) dashboard_server.broadcast(table) build_time = now @@ -480,7 +480,8 @@ def process_message(_message): logging.debug('got BRIDGE_SND opcode') BRIDGES = load_dictionary(_message) BRIDGES_RX = strftime('%Y-%m-%d %H:%M:%S', localtime(time())) - BTABLE['BRIDGES'] = build_bridge_table(BRIDGES) + if BRIDGES_INC: + BTABLE['BRIDGES'] = build_bridge_table(BRIDGES) elif opcode == OPCODE['LINK_EVENT']: logging.info('LINK_EVENT Received: {}'.format(repr(_message[1:])))