Skip to content

Commit

Permalink
Bug fix (up to ver 1.0.9)
Browse files Browse the repository at this point in the history
  • Loading branch information
ǝuıɥsuooɯ committed Nov 15, 2017
1 parent c761237 commit 4d852a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions octoprint_multi_colors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import logging

from flask import jsonify
import os.path, os.linesep
import os.path
from os import linesep
import datetime
import mmap
import re
Expand Down Expand Up @@ -85,10 +86,8 @@ def inject_gcode(self, file, layers, find_string, gcode):
line_found = any(marker in line for line in f)

found = 0
if "\1" in gcode:
replace = ur'{0}{3}{1}{3}'.format(marker, gcode, linesep)
else:
replace = ur'\1{3}{0}{3}{1}{3}'.format(marker, gcode, linesep)

replace = ur'\1{2}{0}{2}{1}{2}'.format(marker, gcode, linesep)

for layer in layers:
with open(file, 'r+') as f:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "OctoPrint MultiColors"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "1.0.8"
plugin_version = "1.0.9"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit 4d852a3

Please sign in to comment.