From a1548e1c1d4d2c9b5dbe80c5005a99883ebd2e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 26 Oct 2017 13:12:09 +0200 Subject: [PATCH] Fix issue in M115 parser If FIRMWARE_NAME is not there, but NAME is neither, we'd run into an exception due to the Malyan detection. Not anymore. Fixes #2181 --- src/octoprint/util/comm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index f1ee6be0..9799127a 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1386,7 +1386,7 @@ class MachineCom(object): # reliable firmware name (NAME + VER) out of the Malyan M115 response. name = data.get("NAME") ver = data.get("VER") - if "malyan" in name.lower() and ver: + if name and "malyan" in name.lower() and ver: firmware_name = name.strip() + " " + ver.strip() if not self._firmware_info_received and firmware_name: