We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20dbdfa commit 9621d28Copy full SHA for 9621d28
index.ts
@@ -151,13 +151,13 @@ export class PythonShell extends EventEmitter{
151
152
// listen to stderr and emit errors for incoming data
153
if (this.stderrParser && this.stderr) {
154
- this.stderr.on('data', function (data) {
155
- errorData += ''+data;
156
- self.receiveStderr(data);
157
- });
+ this.stderr.on('data', this.receiveStderr.bind(this));
158
}
159
160
if (this.stderr) {
+ this.stderr.on('data', function (data) {
+ errorData += '' + data;
+ });
161
this.stderr.on('end', function(){
162
self.stderrHasEnded = true;
163
terminateIfNeeded();
0 commit comments