Merge pull request #6 from dacarley/code-cleanup
A little dead code cleanup
This commit is contained in:
@@ -73,14 +73,12 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
restore: function (e) {
|
restore: function (e) {
|
||||||
debugger;
|
|
||||||
var files = e.target.files || e.dataTransfer.files;
|
var files = e.target.files || e.dataTransfer.files;
|
||||||
if (!files.length) return;
|
if (!files.length) return;
|
||||||
|
|
||||||
var fr = new FileReader();
|
var fr = new FileReader();
|
||||||
fr.onload = function (e) {
|
fr.onload = function (e) {
|
||||||
var config;
|
var config;
|
||||||
debugger;
|
|
||||||
try {
|
try {
|
||||||
config = JSON.parse(e.target.result);
|
config = JSON.parse(e.target.result);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
@@ -111,18 +109,15 @@ module.exports = {
|
|||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
}).done(function (data) {
|
}).done(function (data) {
|
||||||
debugger;
|
var config;
|
||||||
//console.debug('>', data);
|
try {
|
||||||
//this.default_config = data;
|
config = JSON.parse(data);
|
||||||
var config;
|
} catch(ex) {
|
||||||
try {
|
api.alert("Invalid default config file");
|
||||||
config = JSON.parse(data);
|
return;
|
||||||
} 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.confirmReset = false;
|
||||||
|
|
||||||
this.$dispatch('update');
|
this.$dispatch('update');
|
||||||
@@ -149,18 +144,15 @@ module.exports = {
|
|||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
}).done(function (data) {
|
}).done(function (data) {
|
||||||
debugger;
|
var config;
|
||||||
//console.debug('>', data);
|
try {
|
||||||
//this.default_config = data;
|
config = JSON.parse(data);
|
||||||
var config;
|
} catch(ex) {
|
||||||
try {
|
api.alert("Invalid default config file");
|
||||||
config = JSON.parse(data);
|
return;
|
||||||
} 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.confirmReset = false;
|
||||||
|
|
||||||
this.$dispatch('update');
|
this.$dispatch('update');
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ class Planner():
|
|||||||
|
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
# Pass on the planner message
|
# Pass on the planner message
|
||||||
self.log.error(str(e));
|
self.log.error(str(e))
|
||||||
self.stop()
|
self.stop()
|
||||||
|
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user