mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Remove newlines in deserialisation
The artificial line-breaks for the 80-character limit were taken along with the read-by-line of reading the g-code file, apparently. This obviously produced errors in the config parser. Contributes to issue CURA-34.
This commit is contained in:
parent
5358dfe2d6
commit
6d225948f2
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ class GCodeReader(MeshReader):
|
|||
with open(file_name) as f:
|
||||
for line in f:
|
||||
if line.startswith(prefix):
|
||||
serialised += line[len(prefix):] #Remove the prefix from the line, and add it to the rest.
|
||||
serialised += line[len(prefix):-1] #Remove the prefix and the newline from the line, and add it to the rest.
|
||||
except IOError as e:
|
||||
Logger.log("e", "Unable to open file %s for reading: %s", file_name, str(e))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue