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
This commit is contained in:
1 parent
77e48335da
commit
a1548e1c1d
1 file changed
+1
-1
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user