From 27fac71c2fcb22b2c681c9c0985351f094fb4d9e Mon Sep 17 00:00:00 2001 From: Syl Date: Mon, 4 Mar 2024 16:50:16 -0600 Subject: [PATCH] restore pythonbridge file (bugfix) --- util/pythonBridge.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/util/pythonBridge.js b/util/pythonBridge.js index d31a5cd..fef7155 100644 --- a/util/pythonBridge.js +++ b/util/pythonBridge.js @@ -196,7 +196,6 @@ module.exports = { } module.exports.bridgeProc.stderr.on(`data`, d => parseLog(d, `ERR`)); - module.exports.bridgeProc.stdout.on(`data`, d => parseLog(d, `OUT`)); let existingData = ``; @@ -209,18 +208,15 @@ module.exports = { if(!data.includes(`\n\r`)) { existingData += data; - console.log(`existingData (appended): ${existingData.length}`) return; } else { if(existingData) { data = existingData + data; - console.log(`existingData (reset): ${data.length}`) existingData = ``; - } else console.log(`existingData (nothing; no reset): ${data.length}`) + } const parse = (msg) => { const data = JSON.parse(msg.toString().trim()); - console.log(`bridge data for id ${data.id} (exists: ${module.exports.idHooks.find(h => h.id == data.id) ? `yes` : `no`}): [${data.type}] ${data.content.length}`); if(data.id) { module.exports.idHooks.filter(h => h.id == data.id).forEach(h => h.func(data)); };