Fixing my last commit syntax errors.

This commit is contained in:
J.Junquera
2017-10-14 12:16:50 +02:00
parent 0e2b79c735
commit bd1d31a847

View File

@@ -29,18 +29,19 @@ const NvidiaUtil = new Lang.Class({
GLib.close(stdinFd);
GLib.close(stderrFd);
let childWatch = GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, Lang.bind(this, function(pid, status, requestObj) {
let output = [];
let [line, size] = [null, 0];
let output = [];
let [line, size] = [null, 0];
while (([line, size] = outReader.read_line(null)) != null && line != null) {
let match = /.*\[gpu:[\d]\].*\(([\w\d\ ]+)\).*/.exec(line.toString());
if(match){
this._labels.push(match[1]);
}
}
while (([line, size] = outReader.read_line(null)) != null && line != null) {
let match = /.*\[gpu:[\d]\].*\(([\w\d\ ]+)\).*/.exec(line.toString());
if(match){
this._labels.push(match[1]);
}
}
stdout.close(null);
GLib.source_remove(childWatch);
stdout.close(null);
GLib.source_remove(childWatch);
}));
}
},