fix: update with fix by @MostHostLA to fetch current values from firmware
https://github.com/SergiuToporjinschi/OctoPrint-CalibrationTools/issues/40#issuecomment-2700107765
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
import collections
|
||||
from collections.abc import Callable
|
||||
import re
|
||||
import threading
|
||||
import traceback
|
||||
@@ -69,7 +69,7 @@ class Hooks():
|
||||
# Registering a temp event
|
||||
# Trigger a function when the temparature
|
||||
def registerEventTemp(self, tool, targetTemp, func, *arguments):
|
||||
if func is None or not isinstance(func, collections.Callable):
|
||||
if func is None or not isinstance(func, Callable):
|
||||
self._logger.warn("registerEventTemp: Attempt to register event without a function")
|
||||
return
|
||||
|
||||
@@ -91,7 +91,7 @@ class Hooks():
|
||||
self.registerRegexMsg(reg, func, *arguments)
|
||||
|
||||
def registerRegexMsg(self, regex, func, *arguments):
|
||||
if regex is None or func is None or not isinstance(func, collections.Callable):
|
||||
if regex is None or func is None or not isinstance(func, Callable):
|
||||
self._logger.warn("registerRegexMsg: Attempt to register gCodeAnswer without a function or regex")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user