diff options
author | Diego Prado Gesto <d.pradogesto@ultimaker.com> | 2018-05-23 18:17:41 +0300 |
---|---|---|
committer | Diego Prado Gesto <d.pradogesto@ultimaker.com> | 2018-05-23 18:17:41 +0300 |
commit | ddd7b056f387c9bb1a68e4952deac5b783ef723e (patch) | |
tree | 3f2f65e8390348685d23ad34cc0c95efb7bff6d9 /plugins/GCodeReader | |
parent | 39768e29cc10e09c1eb3fbb304739b1d4ef162ca (diff) |
CURA-5164 Make the mesh readers compliant with the new signature of the mesh reader. Also adapt the tests.
Diffstat (limited to 'plugins/GCodeReader')
-rwxr-xr-x | plugins/GCodeReader/GCodeReader.py | 6 | ||||
-rw-r--r-- | plugins/GCodeReader/__init__.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/GCodeReader/GCodeReader.py b/plugins/GCodeReader/GCodeReader.py index a576d6b49f..c51fc9c8a7 100755 --- a/plugins/GCodeReader/GCodeReader.py +++ b/plugins/GCodeReader/GCodeReader.py @@ -27,8 +27,8 @@ class GCodeReader(MeshReader): _flavor_readers_dict = {"RepRap" : RepRapFlavorParser.RepRapFlavorParser(), "Marlin" : MarlinFlavorParser.MarlinFlavorParser()} - def __init__(self): - super(GCodeReader, self).__init__() + def __init__(self, application): + super(GCodeReader, self).__init__(application) self._supported_extensions = [".gcode", ".g"] self._flavor_reader = None @@ -57,7 +57,7 @@ class GCodeReader(MeshReader): def readFromStream(self, stream): return self._flavor_reader.processGCodeStream(stream) - def read(self, file_name): + def _read(self, file_name): with open(file_name, "r", encoding = "utf-8") as file: file_data = file.read() return self.readFromStream(file_data) diff --git a/plugins/GCodeReader/__init__.py b/plugins/GCodeReader/__init__.py index 999dd37a37..399de8a90e 100644 --- a/plugins/GCodeReader/__init__.py +++ b/plugins/GCodeReader/__init__.py @@ -23,4 +23,4 @@ def getMetaData(): def register(app): app.addNonSliceableExtension(".gcode") app.addNonSliceableExtension(".g") - return { "mesh_reader": GCodeReader.GCodeReader() } + return { "mesh_reader": GCodeReader.GCodeReader(app) } |