Make compatible with fixed hex tc handles

This commit is contained in:
Robert Chacón 2022-07-04 22:19:30 -06:00 committed by GitHub
parent 3919dd92cc
commit 5186c282db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,8 @@ def getDeviceStats(devices):
jsonVersion = interfaceBjson
for element in jsonVersion:
if "parent" in element:
if element['parent'] == device['qdisc']:
decimalQdisc = str(int((device['qdisc'].split(':')[0]), 16)) + ':' + str(int((device['qdisc'].split(':')[1]), 16))
if element['parent'] == decimalQdisc:
drops = int(element['drops'])
packets = int(element['packets'])
bytesSent = int(element['bytes'])