From c3619a3795b32b94a3577e4cff6e4b59421481ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 24 May 2017 18:04:11 +0200 Subject: [PATCH] No scary message on autodetect fail --- src/octoprint/static/js/app/dataupdater.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/octoprint/static/js/app/dataupdater.js b/src/octoprint/static/js/app/dataupdater.js index ca25b810..3c9dfbf4 100644 --- a/src/octoprint/static/js/app/dataupdater.js +++ b/src/octoprint/static/js/app/dataupdater.js @@ -198,12 +198,14 @@ function DataUpdater(allViewModels) { }); } } else if (type == "Error") { - new PNotify({ - title: gettext("Unhandled communication error"), - text: _.sprintf(gettext("The was an unhandled error while talking to the printer. Due to that OctoPrint disconnected. Error: %(error)s"), payload), - type: "error", - hide: false - }); + if (payload.error && payload.error.indexOf("autodetect") == -1) { // ignore "failed to autodetect" + new PNotify({ + title: gettext("Unhandled communication error"), + text: _.sprintf(gettext("The was an unhandled error while talking to the printer. Due to that OctoPrint disconnected. Error: %(error)s"), payload), + type: "error", + hide: false + }); + } } var legacyEventHandlers = {