Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions octoprint_filamentmanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def calculate_weight(length, profile):
volume = (length * PI * radius * radius) / 1000 # cm³
return volume * profile["density"] # g

for tool in xrange(0, numTools):
for tool in range(0, numTools):
self._logger.info("Filament used: {length} mm (tool{id})"
.format(length=str(extrusion[tool]), id=str(tool)))

Expand Down Expand Up @@ -357,7 +357,7 @@ def get_update_information(self):


__plugin_name__ = "Filament Manager"

__plugin_pythoncompat__ = ">=2.7,<4"
__required_octoprint_version__ = ">=1.3.6"


Expand Down
2 changes: 1 addition & 1 deletion octoprint_filamentmanager/api/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ def add_revalidation_header_with_no_max_age(response, lm, etag):


def entity_tag(lm):
return (hashlib.sha1(str(lm))).hexdigest()
return (hashlib.sha1(str(lm).encode(encoding='UTF-8')).hexdigest())