/** {@inheritDoc} */ public ScriptCommandImpl(final ScriptCommand command, final JythonSupport jython) throws Exception { super(command, jython); try { script_object = jython.loadClass(ScanScript.class, command.getScript()); } catch (PyException ex) { throw new Exception(JythonSupport.getExceptionMessage(ex), ex); } }
/** {@inheritDoc} */ @Override public void execute(final ScanContext context) throws Exception { try { final ScanScriptContext script_context = new ScriptCommandContextImpl(context); script_object.run(script_context); } catch (PyException ex) { throw new Exception(command.getScript() + ":" + JythonSupport.getExceptionMessage(ex), ex); } context.workPerformed(1); }