Remove superfluous code (state is always set later in controlling thread).

This commit is contained in:
Johannes Mockenhaupt 2017-07-17 18:27:55 +02:00
parent 599f3ce23c
commit 55e7006967
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -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);