fix valueerror

This commit is contained in:
Cyberes 2023-12-19 23:30:54 -07:00
parent 445d4e274c
commit 0300fdd75e
2 changed files with 7 additions and 4 deletions

View File

@ -76,8 +76,11 @@ class OpnsenseTraffic:
keys = self.redis.keys()
data = {}
for key in keys:
print(key.decode())
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)

View File

@ -1,5 +1,5 @@
prometheus_client
requests~=2.28.2
requests~=2.31.0
numpy~=1.24.2
matrix-nio
Pillow~=9.4.0