(self, filename)
| 44 | self._gcode.abort() |
| 45 | |
| 46 | def _analyzeFile(self, filename): |
| 47 | path = self._getPathCallback(filename) |
| 48 | |
| 49 | if path is None or not os.path.exists(path): |
| 50 | return |
| 51 | |
| 52 | self._currentFile = filename |
| 53 | self._currentProgress = 0 |
| 54 | |
| 55 | try: |
| 56 | self._logger.debug("Starting analysis of file %s" % filename) |
| 57 | eventManager().fire(Events.METADATA_ANALYSIS_STARTED, {"file": filename}) |
| 58 | self._gcode = GcodeInterpreter(self._loadedCallback,self._currentFile) |
| 59 | self._gcode.progressCallback = self._onParsingProgress |
| 60 | self._gcode.load(path) |
| 61 | |
| 62 | finally: |
| 63 | self._gcode = None |
| 64 | self._currentProgress = None |
| 65 | self._currentFile = None |
| 66 | |
| 67 | class GcodeInterpreter(object): |
| 68 | def __init__(self,loadedCallback,currentFile): |
nothing calls this directly
no test coverage detected