Fix: SD card errors shouldn't not cause disconnect

If the SD card fails to initialize with a volume.init failure, that's
not a reason to break off all diplomatic relations with the printer.
(cherry picked from commit 9caf13d)
This commit is contained in:
Gina Häußge 2015-06-28 16:32:07 +02:00
parent 4b11032567
commit 4dc9d0a536

View file

@ -1298,10 +1298,14 @@ class MachineCom(object):
if self._regex_minMaxError.match(line):
line = line.rstrip() + self._readline()
#Skip the communication errors, as those get corrected.
if 'line number' in line.lower() or 'checksum' in line.lower() or 'expected line' in line.lower():
#Skip the communication errors, as those get corrected.
self._lastCommError = line[6:] if line.startswith("Error:") else line[2:]
pass
elif 'volume.init' in line.lower() or "openroot" in line.lower() or 'workdir' in line.lower()\
or "error writing to file" in line.lower():
#Also skip errors with the SD card
pass
elif not self.isError():
self._errorValue = line[6:] if line.startswith("Error:") else line[2:]
self._changeState(self.STATE_ERROR)