From: Youness Alaoui Date: Mon, 16 Feb 2015 18:40:06 +0000 (-0500) Subject: Do not close the gcodeFile in the interpreter when it gets cancelled X-Git-Tag: lulzbot-15.02.1-1.01~63 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3c7a9de1aeab5c749523b8dcc20ccc183278f13a;p=cura.git 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 --- 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(';')]