Skip to content

Commit

Permalink
Fix response time division issue if 'None'
Browse files Browse the repository at this point in the history
  • Loading branch information
Liquid369 committed Sep 13, 2024
1 parent 230227f commit b4ca69e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit b4ca69e

Please sign in to comment.