FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use cli error function for device not supporting pairing output · python-kasa/python-kasa@2cbe305 · GitHub

Repository navigation

Commit 2cbe305

Browse files
committed
Use cli error function for device not supporting pairing output
1 parent fd68468 commit 2cbe305

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎kasa/cli.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,8 +1316,7 @@ async def child_list(dev):
13161316
async def child_pair(dev, timeout):
13171317
"""Pair new device."""
13181318
if (cs := dev.modules.get(Module.ChildSetup)) is None:
1319-
echo("%s does not support pairing." % dev)
1320-
return
1319+
error("%s does not support pairing." % dev)
13211320

13221321
echo("Finding new devices for %s seconds" % timeout)
13231322
return await cs.pair(timeout=timeout)
@@ -1329,8 +1328,7 @@ async def child_pair(dev, timeout):
13291328
async def child_unpair(dev, device_id: str):
13301329
"""Unpair given device."""
13311330
if (cs := dev.modules.get(Module.ChildSetup)) is None:
1332-
echo("%s does not support pairing." % dev)
1333-
return
1331+
error("%s does not support pairing." % dev)
13341332

13351333
res = await cs.unpair(device_id=device_id)
13361334
echo("Unpaired %s (if it was paired)" % device_id)

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL