summaryrefslogtreecommitdiffstats
path: root/cli/objects/wol.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/objects/wol.py')
-rw-r--r--cli/objects/wol.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/cli/objects/wol.py b/cli/objects/wol.py
index 9eba702..7284895 100644
--- a/cli/objects/wol.py
+++ b/cli/objects/wol.py
@@ -53,8 +53,8 @@ class OgWol():
help='Specific client IP')
parsed_args = parser.parse_args(args)
- r = rest.get('/scopes')
- scopes = r.json()
+ res = rest.get('/scopes')
+ scopes = res.json()
ips = set()
for center in parsed_args.center_id:
@@ -68,7 +68,10 @@ class OgWol():
if not ips:
print("Missing --client-ip, or --room-id/--center-id. No clients provided.")
- return None
+ return 1
payload = {'type': parsed_args.type, 'clients': list(ips)}
- r = rest.post('/wol', payload=payload)
+ res = rest.post('/wol', payload=payload)
+ if not res:
+ return 1
+ return 0