From 55e7006967c2ff0cd7b559707017b6ee2e2461db Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Mon, 17 Jul 2017 18:27:55 +0200 Subject: [PATCH] Remove superfluous code (state is always set later in controlling thread). --- .../main/java/de/jotomo/ruffyscripter/RuffyScripter.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java index a92844334c..9dc7b6f8e2 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java @@ -181,11 +181,7 @@ public class RuffyScripter { // check if pump is an an error state if (currentMenu == null || currentMenu.getType() == MenuType.WARNING_OR_ERROR) { try { - PumpState pumpState = null; - try { - pumpState = readPumpState(); - } catch (Exception e) { /* We tried ... */ } - returnable.cmdResult = new CommandResult().message("Pump is in an error state: " + currentMenu.getAttribute(MenuAttribute.MESSAGE)).state(pumpState); + returnable.cmdResult = new CommandResult().message("Pump is in an error state: " + currentMenu.getAttribute(MenuAttribute.MESSAGE)); return; } catch (Exception e) { returnable.cmdResult = new CommandResult().message("Pump is in an error state, reading the error state resulted in the attached exception").exception(e);