[automation] Correctly return the evaluation result of DSL scripts
Fixes #1946 Signed-off-by: Kai Kreuzer <kai@openhab.org>pull/1884/head
parent
397ebaab64
commit
4059ea2422
|
@ -122,11 +122,10 @@ public class DSLScriptEngine implements javax.script.ScriptEngine {
|
|||
s = scriptEngine.newScriptFromString(script);
|
||||
}
|
||||
IEvaluationContext evalContext = createEvaluationContext(s, specificContext);
|
||||
s.execute(evalContext);
|
||||
return s.execute(evalContext);
|
||||
} catch (ScriptExecutionException | ScriptParsingException e) {
|
||||
throw new ScriptException(e.getMessage(), modelName, -1);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private DefaultEvaluationContext createEvaluationContext(Script script, IEvaluationContext specificContext) {
|
||||
|
|
Loading…
Reference in New Issue