Index: tests/test_nelson_labs_disinfect.py =================================================================== diff -u -rbb27421af996ff0333c514d27d9c0b13155bce77 -r5d46528dea60d95e18caada03ff8e328b52bbb38 --- tests/test_nelson_labs_disinfect.py (.../test_nelson_labs_disinfect.py) (revision bb27421af996ff0333c514d27d9c0b13155bce77) +++ tests/test_nelson_labs_disinfect.py (.../test_nelson_labs_disinfect.py) (revision 5d46528dea60d95e18caada03ff8e328b52bbb38) @@ -247,13 +247,14 @@ f.write(var) sleep(1) - if call_numer > 3: - # Wait for a couple of seconds and them exit this loop if we are no longer in any of the disinfec modes - if dg.dg_operation_mode is not DGOperationModes.DG_OP_MODE_DISINFECT.value and \ - dg.dg_operation_mode is not DGOperationModes.DG_OP_MODE_CHEMICAL_DISINFECT.value: + # Wait for a couple of seconds and then exit this loop if we are no longer in any of the disinfect modes + if dg.dg_operation_mode is not DGOperationModes.DG_OP_MODE_DISINFECT.value and \ + dg.dg_operation_mode is not DGOperationModes.DG_OP_MODE_CHEMICAL_DISINFECT.value: + call_numer += 1 + + if call_numer > 3: f.close() exit() - call_numer += 1 except KeyboardInterrupt: dg.hd_proxy.cmd_start_stop_dg_heat_disinfect(start=False)