mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Check that priorQuery exists before using it
This commit is contained in:
parent
3f0ce35454
commit
567cde6b7c
@ -331,11 +331,10 @@ def getCircuitLatencyStats(subscriberCircuits):
|
|||||||
# If we can't identify RTT this time around, use most recently recorded RTT
|
# If we can't identify RTT this time around, use most recently recorded RTT
|
||||||
# None by default, change if found in priorQuery
|
# None by default, change if found in priorQuery
|
||||||
circuit['stats']['sinceLastQuery']['tcpLatency'] = None
|
circuit['stats']['sinceLastQuery']['tcpLatency'] = None
|
||||||
if 'priorQuery' in circuit['stats']:
|
if 'priorQuery' in circuit['stats'] and circuit['stats']['priorQuery'] != None:
|
||||||
if circuit['stats']['priorQuery'] != None:
|
if 'priorQuery' in circuit['stats']:
|
||||||
if 'priorQuery' in circuit['stats']:
|
if 'tcpLatency' in circuit['stats']['priorQuery']:
|
||||||
if 'tcpLatency' in circuit['stats']['priorQuery']:
|
circuit['stats']['sinceLastQuery']['tcpLatency'] = circuit['stats']['priorQuery']['tcpLatency']
|
||||||
circuit['stats']['sinceLastQuery']['tcpLatency'] = circuit['stats']['priorQuery']['tcpLatency']
|
|
||||||
|
|
||||||
return subscriberCircuits
|
return subscriberCircuits
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user