From 481a750cf67ee445f89d68bee4201d48943b7a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 18 Aug 2013 18:41:20 +0200 Subject: [PATCH] Check if self._comm is None before trying to select a file... (cherry picked from commit 5631a45) --- octoprint/printer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octoprint/printer.py b/octoprint/printer.py index d5b56fa2..d5fc445f 100644 --- a/octoprint/printer.py +++ b/octoprint/printer.py @@ -175,7 +175,7 @@ class Printer(): self._comm.sendCommand(command) def selectFile(self, filename, sd, printAfterSelect=False): - if self._comm is not None and (self._comm.isBusy() or self._comm.isStreaming()): + if self._comm is None or (self._comm.isBusy() or self._comm.isStreaming()): return self._printAfterSelect = printAfterSelect