From b4ca69e0e4972bc5c26847a31ef0cb2a861298f8 Mon Sep 17 00:00:00 2001 From: Liquid369 Date: Fri, 13 Sep 2024 09:31:22 -0500 Subject: [PATCH] Fix response time division issue if 'None' --- src/mainWindow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mainWindow.py b/src/mainWindow.py index a934da9..f79668f 100644 --- a/src/mainWindow.py +++ b/src/mainWindow.py @@ -522,7 +522,10 @@ def updateRPCstatus(self, ctrl, fDebug=False): return rpcResponseTime = None - if r_time1 is not None and r_time2 != 0: + if r_time1 is None: + r_time1 = 0.0 + if r_time2 is None: + r_time2 = 0.0 rpcResponseTime = round((r_time1 + r_time2) / 2, 3) # Do not update status if the user has selected a different server since the start of updateRPCStatus()