Skip to content
Permalink
Browse files

Fix error where API state is requested and printer is offline

  • Loading branch information...
C-o-r-E committed Mar 18, 2014
1 parent 50cf776 commit 619fe9a0e78826bd1524b235a910156439bcb6d7
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/octoprint/printer.py
@@ -607,12 +607,13 @@ def getCurrentTemperatures(self):
bedTempOffset = None

result = {}
for tool in self._temp.keys():
result["tool%d" % tool] = {
"actual": self._temp[tool][0],
"target": self._temp[tool][1],
"offset": tempOffset[tool] if tool in tempOffset.keys() and tempOffset[tool] is not None else 0
}
if self._temp is not None:
for tool in self._temp.keys():
result["tool%d" % tool] = {
"actual": self._temp[tool][0],
"target": self._temp[tool][1],
"offset": tempOffset[tool] if tool in tempOffset.keys() and tempOffset[tool] is not None else 0
}
if self._bedTemp is not None:
result["bed"] = {
"actual": self._bedTemp[0],

0 comments on commit 619fe9a

Please sign in to comment.
You can’t perform that action at this time.