From 0835dd31087c43de184fb33c210d59666b9401b9 Mon Sep 17 00:00:00 2001 From: Matthew Stanton Date: Mon, 1 Jun 2026 19:44:36 -0400 Subject: [PATCH] Guard optional stream setEncoding Signed-off-by: Matthew Stanton --- index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/index.ts b/index.ts index 9569354..bcfc606 100644 --- a/index.ts +++ b/index.ts @@ -193,6 +193,7 @@ export class PythonShell extends EventEmitter { self[name] = self.childProcess[name]; self.parser && self[name] && + typeof self[name].setEncoding === 'function' && self[name].setEncoding(options.encoding || 'utf8'); });