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:
Gina Häußge 2017-10-26 13:12:09 +02:00
parent 77e48335da
commit a1548e1c1d

View file

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