Skip to content

Commit ab8f4f7

Browse files
committed
test
1 parent 45ed5a5 commit ab8f4f7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

octoprint_octoeverywhere/printerstateobject.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,8 @@ def GetTemps(self):
144144
if self._Exists(bed, "actual"):
145145
bedActual = round(float(bed["actual"]), 2)
146146
return (hotendActual, bedActual)
147+
148+
149+
# A helper for checking if things exist in dicts.
150+
def _Exists(self, dictObj:dict, key:str):
151+
return key in dictObj and dictObj[key] is not None

0 commit comments

Comments
 (0)