mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-22 08:16:25 -06:00
Check that priorQuery exists before using it
This commit is contained in:
parent
5d36828b35
commit
691a1d9e6d
@ -331,7 +331,7 @@ def getCircuitLatencyStats(subscriberCircuits):
|
||||
# If we can't identify RTT this time around, use most recently recorded RTT
|
||||
# None by default, change if found in priorQuery
|
||||
circuit['stats']['sinceLastQuery']['tcpLatency'] = None
|
||||
if circuit['stats']['priorQuery'] != None:
|
||||
if 'priorQuery' in circuit['stats'] and circuit['stats']['priorQuery'] != None:
|
||||
if 'priorQuery' in circuit['stats']:
|
||||
if 'tcpLatency' in circuit['stats']['priorQuery']:
|
||||
circuit['stats']['sinceLastQuery']['tcpLatency'] = circuit['stats']['priorQuery']['tcpLatency']
|
||||
|
Loading…
Reference in New Issue
Block a user