fix(Code Node): Consistent redirection of stdout for JS and Python sandboxes (#6818)

Co-authored-by: Marcus <marcus@n8n.io>
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-08-01 17:47:43 +02:00
committed by GitHub
parent 34df8b6238
commit f718c2291f
5 changed files with 28 additions and 31 deletions

View File

@@ -67,10 +67,7 @@ export class PythonSandbox extends Sandbox {
globalsDict.set(key, value);
}
await pyodide.runPythonAsync(`
if 'printOverwrite' in globals():
print = printOverwrite
`);
pyodide.setStdout({ batched: (str) => this.emit('output', str) });
const runCode = `
async def __main():