A little dead code cleanup

This commit is contained in:
David Carley
2021-03-02 10:20:16 -08:00
parent a0ae0a4e30
commit 1b32eeacc4
2 changed files with 19 additions and 27 deletions

View File

@@ -73,14 +73,12 @@ module.exports = {
restore: function (e) {
debugger;
var files = e.target.files || e.dataTransfer.files;
if (!files.length) return;
var fr = new FileReader();
fr.onload = function (e) {
var config;
debugger;
try {
config = JSON.parse(e.target.result);
} catch (ex) {
@@ -111,18 +109,15 @@ module.exports = {
cache: false
}).done(function (data) {
debugger;
//console.debug('>', data);
//this.default_config = data;
var config;
try {
config = JSON.parse(data);
} catch(ex) {
api.alert("Invalid default config file");
return;
}
var config;
try {
config = JSON.parse(data);
} catch(ex) {
api.alert("Invalid default config file");
return;
}
api.put('config/save', config).done(function (data) {
api.put('config/save', config).done(function (data) {
this.confirmReset = false;
this.$dispatch('update');
@@ -149,18 +144,15 @@ module.exports = {
cache: false
}).done(function (data) {
debugger;
//console.debug('>', data);
//this.default_config = data;
var config;
try {
config = JSON.parse(data);
} catch(ex) {
api.alert("Invalid default config file");
return;
}
var config;
try {
config = JSON.parse(data);
} catch(ex) {
api.alert("Invalid default config file");
return;
}
api.put('config/save', config).done(function (data) {
api.put('config/save', config).done(function (data) {
this.confirmReset = false;
this.$dispatch('update');

View File

@@ -381,7 +381,7 @@ class Planner():
except RuntimeError as e:
# Pass on the planner message
self.log.error(str(e));
self.log.error(str(e))
self.stop()
except: