power: type checking fix

For legacy purposes its possible that "initialize()" may be an
awaitable.   Ignore the type as it consues mypy.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-06-29 12:06:36 -04:00
parent 31d4335e3e
commit d37f91c9c8
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ class PrinterPower:
f"Device [{name}] already configured")
success = device.initialize()
if asyncio.iscoroutine(success):
success = await success
success = await success # type: ignore
if not success:
self.server.add_warning(
f"Power device '{device.get_name()}' failed to initialize"