diff options
Diffstat (limited to 'cli/objects/session.py')
-rw-r--r-- | cli/objects/session.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cli/objects/session.py b/cli/objects/session.py index 0168cb3..4fde4d0 100644 --- a/cli/objects/session.py +++ b/cli/objects/session.py @@ -44,8 +44,8 @@ class OgSession(): 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: @@ -59,11 +59,14 @@ class OgSession(): if not ips: print("Missing --client-ip, or --room-id/--center-id. No clients provided.") - return None + return 1 payload = { 'clients': list(ips), 'disk': parsed_args.disk, 'partition': parsed_args.part, } - r = rest.post('/session', payload=payload) + res = rest.post('/session', payload=payload) + if not res: + return 1 + return 0 |