Skip to content

Commit

Permalink
fixes #117
Browse files Browse the repository at this point in the history
  • Loading branch information
CoDanny committed Jun 6, 2016
1 parent 83f6656 commit 61f25e3
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/astroprint/printer/marlin/comm.py
Expand Up @@ -1017,13 +1017,17 @@ def _handleErrors(self, line):
if self._regex_minMaxError.match(line):
line = line.rstrip() + self._readline()
#Skip the communication errors, as those get corrected.
if 'checksum mismatch' in line \
or 'Wrong checksum' in line \
or 'Line Number is not Last Line Number' in line \
or 'expected line' in line \
or 'No Line Number with checksum' in line \
or 'No Checksum with line number' in line \
or 'Missing checksum' in line:

line_lower = line.lower()

if 'checksum mismatch' in line_lower \
or 'wrong checksum' in line_lower \
or 'line number is not last line number' in line_lower \
or 'expected line' in line_lower \
or 'no line number with checksum' in line_lower \
or 'no checksum with line number' in line_lower \
or 'format error' in line_lower \
or 'missing checksum' in line_lower:
pass
elif not self.isError():
self._errorValue = line[6:]
Expand Down

0 comments on commit 61f25e3

Please sign in to comment.