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/GCodeGzReader | |
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/GCodeGzReader')
-rw-r--r-- | plugins/GCodeGzReader/GCodeGzReader.py | 6 | ||||
-rw-r--r-- | plugins/GCodeGzReader/__init__.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/GCodeGzReader/GCodeGzReader.py b/plugins/GCodeGzReader/GCodeGzReader.py index 86c0af89a2..7a6a76d4a5 100644 --- a/plugins/GCodeGzReader/GCodeGzReader.py +++ b/plugins/GCodeGzReader/GCodeGzReader.py @@ -12,11 +12,11 @@ from UM.PluginRegistry import PluginRegistry # If you're zipping g-code, you might as well use gzip! class GCodeGzReader(MeshReader): - def __init__(self): - super().__init__() + def __init__(self, application): + super().__init__(application) self._supported_extensions = [".gcode.gz"] - def read(self, file_name): + def _read(self, file_name): with open(file_name, "rb") as file: file_data = file.read() uncompressed_gcode = gzip.decompress(file_data).decode("utf-8") diff --git a/plugins/GCodeGzReader/__init__.py b/plugins/GCodeGzReader/__init__.py index 6e720b1ed1..e6bae6615e 100644 --- a/plugins/GCodeGzReader/__init__.py +++ b/plugins/GCodeGzReader/__init__.py @@ -21,4 +21,4 @@ def getMetaData(): def register(app): app.addNonSliceableExtension(".gz") - return { "mesh_reader": GCodeGzReader.GCodeGzReader() } + return { "mesh_reader": GCodeGzReader.GCodeGzReader(app) } |