From 3c7a9de1aeab5c749523b8dcc20ccc183278f13a Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Mon, 16 Feb 2015 13:40:06 -0500 Subject: [PATCH] Do not close the gcodeFile in the interpreter when it gets cancelled This can cause issues because the calling function handles the closing of the files (in this case load() instead of _load()) and the gcodeFile could also be a list or a bigDataStorage which do not have a close() method. Fixes issue #91 --- Cura/util/gcodeInterpreter.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Cura/util/gcodeInterpreter.py b/Cura/util/gcodeInterpreter.py index 4e51ef33..6556f360 100644 --- a/Cura/util/gcodeInterpreter.py +++ b/Cura/util/gcodeInterpreter.py @@ -120,7 +120,6 @@ class gcode(object): if self.progressCallback is not None: if self.progressCallback(float(gcodeFile.tell()) / float(self._fileSize)): #Abort the loading, we can safely return as the results here will be discarded - gcodeFile.close() return currentLayer = [currentPath] line = line[0:line.find(';')] -- 2.30.2