Merge pull request #694 from bbernhard/octoprint_long_error
small improvements in octoprint plugin
This commit is contained in:
commit
9d5035fa10
1 changed files with 9 additions and 2 deletions
|
@ -85,8 +85,15 @@ class Module(core.module.Module):
|
||||||
core.input.register(self, button=core.input.LEFT_MOUSE, cmd=self.__show_popup)
|
core.input.register(self, button=core.input.LEFT_MOUSE, cmd=self.__show_popup)
|
||||||
|
|
||||||
def octoprint_status(self, widget):
|
def octoprint_status(self, widget):
|
||||||
if self.__octoprint_state == "Offline" or self.__octoprint_state == "Unknown":
|
if (
|
||||||
return self.__octoprint_state
|
self.__octoprint_state.startswith("Offline")
|
||||||
|
or self.__octoprint_state == "Unknown"
|
||||||
|
):
|
||||||
|
return (
|
||||||
|
(self.__octoprint_state[:25] + "...")
|
||||||
|
if len(self.__octoprint_state) > 25
|
||||||
|
else self.__octoprint_state
|
||||||
|
)
|
||||||
return (
|
return (
|
||||||
self.__octoprint_state
|
self.__octoprint_state
|
||||||
+ " | B: "
|
+ " | B: "
|
||||||
|
|
Loading…
Reference in a new issue