Skip to content

Commit

Permalink
new running_loop printer's property
Browse files Browse the repository at this point in the history
  • Loading branch information
ondratu committed Mar 26, 2024
1 parent f831ca8 commit d2b9cdd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion prusa/connect/printer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ def connect_url(host: str, tls: bool, port: int = 0):
return f"{protocol}://{host}:{port}"
return f"{protocol}://{host}"

@property
def running_loop(self):
"""Return if loop is running (if was started but not stopped)."""
return self.__running_loop

@property
def printed_file_cb(self):
"""Returns path of currently printed file"""
Expand Down Expand Up @@ -699,7 +704,7 @@ def register(self):
else:
errors.HTTP.ok = True
HTTP.state = CondState.OK
log.debug("Status code: {res.status_code}")
log.debug("Status code: %d", res.status_code)
raise RuntimeError(res.text)

self.code = res.headers["Code"]
Expand Down

0 comments on commit d2b9cdd

Please sign in to comment.