fix valueerror
This commit is contained in:
parent
445d4e274c
commit
0300fdd75e
|
@ -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)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
prometheus_client
|
||||
requests~=2.28.2
|
||||
requests~=2.31.0
|
||||
numpy~=1.24.2
|
||||
matrix-nio
|
||||
Pillow~=9.4.0
|
||||
|
|
Loading…
Reference in New Issue