From 9e1760fb36a22d1dfb10f5cff9fa12e0a679c3ce Mon Sep 17 00:00:00 2001 From: Alex Ustyantsev Date: Wed, 13 Feb 2013 18:19:18 +0300 Subject: [PATCH] Fixed bug preventing from being able to connect to printer --- octoprint/printer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octoprint/printer.py b/octoprint/printer.py index c869303..4bac804 100644 --- a/octoprint/printer.py +++ b/octoprint/printer.py @@ -362,7 +362,7 @@ class Printer(): elif state == self._comm.STATE_CLOSED or state == self._comm.STATE_ERROR or state == self._comm.STATE_CLOSED_WITH_ERROR: self._gcodeManager.printFailed(self._filename) self._gcodeManager.resumeAnalysis() # do not analyse gcode while printing - elif state == self._comm.STATE_PRINTING: + elif self._comm is not None and state == self._comm.STATE_PRINTING: self._gcodeManager.pauseAnalysis() # printing done, put those cpu cycles to good use self._setState(state)