diff --git a/octoprint/settings.py b/octoprint/settings.py index 36ea9e64..d0924168 100644 --- a/octoprint/settings.py +++ b/octoprint/settings.py @@ -276,6 +276,7 @@ class Settings(object): def setInt(self, path, value, force=False): if value is None: self.set(path, None, force) + return try: intValue = int(value) diff --git a/octoprint/util/comm.py b/octoprint/util/comm.py index 1168a614..1f9d4799 100644 --- a/octoprint/util/comm.py +++ b/octoprint/util/comm.py @@ -843,7 +843,7 @@ class MachineCom(object): if lineToResend is not None: self._resendDelta = self._currentLine - lineToResend - if self._resendDelta > len(self._lastLines): + if self._resendDelta > len(self._lastLines) or len(self._lastLines) == 0: self._errorValue = "Printer requested line %d but no sufficient history is available, can't resend" % lineToResend self._logger.warn(self._errorValue) if self.isPrinting():