klippy_connection: fix linter errors
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
327441fd6b
commit
282cf1ce03
|
@ -328,13 +328,13 @@ class KlippyConnection:
|
||||||
async def _request_initial_subscriptions(self) -> None:
|
async def _request_initial_subscriptions(self) -> None:
|
||||||
try:
|
try:
|
||||||
await self.klippy_apis.subscribe_objects({'webhooks': None})
|
await self.klippy_apis.subscribe_objects({'webhooks': None})
|
||||||
except ServerError as e:
|
except ServerError:
|
||||||
logging.exception("Unable to subscribe to webhooks object")
|
logging.exception("Unable to subscribe to webhooks object")
|
||||||
else:
|
else:
|
||||||
logging.info("Webhooks Subscribed")
|
logging.info("Webhooks Subscribed")
|
||||||
try:
|
try:
|
||||||
await self.klippy_apis.subscribe_gcode_output()
|
await self.klippy_apis.subscribe_gcode_output()
|
||||||
except ServerError as e:
|
except ServerError:
|
||||||
logging.exception(
|
logging.exception(
|
||||||
"Unable to register gcode output subscription"
|
"Unable to register gcode output subscription"
|
||||||
)
|
)
|
||||||
|
@ -409,8 +409,7 @@ class KlippyConnection:
|
||||||
async def _verify_klippy_requirements(self) -> None:
|
async def _verify_klippy_requirements(self) -> None:
|
||||||
result = await self.klippy_apis.get_object_list(default=None)
|
result = await self.klippy_apis.get_object_list(default=None)
|
||||||
if result is None:
|
if result is None:
|
||||||
logging.info(
|
logging.info("Unable to retrieve Klipper Object List")
|
||||||
f"Unable to retrieve Klipper Object List")
|
|
||||||
return
|
return
|
||||||
req_objs = set(["virtual_sdcard", "display_status", "pause_resume"])
|
req_objs = set(["virtual_sdcard", "display_status", "pause_resume"])
|
||||||
self._missing_reqs = req_objs - set(result)
|
self._missing_reqs = req_objs - set(result)
|
||||||
|
@ -425,7 +424,7 @@ class KlippyConnection:
|
||||||
query_res = await self.klippy_apis.query_objects(
|
query_res = await self.klippy_apis.query_objects(
|
||||||
{'configfile': None}, default=None)
|
{'configfile': None}, default=None)
|
||||||
if query_res is None:
|
if query_res is None:
|
||||||
logging.info(f"Unable to set SD Card path")
|
logging.info("Unable to set SD Card path")
|
||||||
else:
|
else:
|
||||||
config = query_res.get('configfile', {}).get('config', {})
|
config = query_res.get('configfile', {}).get('config', {})
|
||||||
vsd_config = config.get('virtual_sdcard', {})
|
vsd_config = config.get('virtual_sdcard', {})
|
||||||
|
|
Loading…
Reference in New Issue