diff --git a/opnsense_traffic_watcher.py b/opnsense_traffic_watcher.py index 6816be2..68e537b 100644 --- a/opnsense_traffic_watcher.py +++ b/opnsense_traffic_watcher.py @@ -76,8 +76,11 @@ class OpnsenseTraffic: keys = self.redis.keys() data = {} for key in keys: - print(key.decode()) - interface, address = key.decode().split(":") + try: + interface, address = key.decode().split(":") + except ValueError: + # Can get things like "opt2:::" + continue if address != input_address: continue entries = self.redis.lrange(key, 0, -1) @@ -256,4 +259,4 @@ if __name__ == '__main__': time.sleep(10000) else: - app.run(debug=True) + app.run(host='0.0.0.0', debug=True) diff --git a/requirements.txt b/requirements.txt index 085fa30..1701b21 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ prometheus_client -requests~=2.28.2 +requests~=2.31.0 numpy~=1.24.2 matrix-nio Pillow~=9.4.0