fix for wrong lm_sensors error output #66

This commit is contained in:
UshakovVasilii
2019-05-17 14:04:14 +03:00
parent e169842b3d
commit e559cb3e4c

View File

@@ -49,6 +49,7 @@ var SensorsUtil = class extends CommandLineUtil.CommandLineUtil {
// https://github.com/UshakovVasilii/gnome-shell-extension-freon/issues/114#issuecomment-491613545
let lineRemoved = this._output.filter(l => l.trim() !== ',').join('\n');
let errorRemoved = lineRemoved.replace(/ERROR.*Can't read/, "");
errorRemoved = errorRemoved.replace(/ERROR.*I/O error/, "");
data = JSON.parse(errorRemoved);
} catch (e) {
global.log(e.toString());