Merge pull request #6 from dacarley/code-cleanup

A little dead code cleanup
This commit is contained in:
OneFinityCNC
2021-03-03 00:02:39 -05:00
committed by GitHub
2 changed files with 19 additions and 27 deletions

View File

@@ -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');

View File

@@ -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: