midi: fix midi list() (handle extra python logs properly)

This commit is contained in:
bordun 2020-06-24 14:50:55 +02:00
parent 39e9c43f04
commit 78e434788a

View file

@ -63,7 +63,7 @@ class MidiConverter {
try {
[name, data] = JSON.parse(message)
} catch (err) {
if (settings.read('debug')) console.error(`(DEBUG, MIDI) Could not parse python's output:\n ${message}`)
if (settings.read('debug')) console.error(`(DEBUG, MIDI) Unparsed python log:\n ${message}`)
}
if (name == 'log') {
if (data.indexOf('ERROR') > -1) {
@ -93,7 +93,9 @@ class MidiConverter {
}
}
MidiConverter.parseIpc(results)
for (let r of results) {
MidiConverter.parseIpc(r)
}
})
}