summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/cli/command.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/cli/command.py')
-rw-r--r--src/leap/bitmask/cli/command.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/bitmask/cli/command.py b/src/leap/bitmask/cli/command.py
index 0e70d2e7..ff213a35 100644
--- a/src/leap/bitmask/cli/command.py
+++ b/src/leap/bitmask/cli/command.py
@@ -116,7 +116,11 @@ class Command(object):
if self.print_json:
print(json.dumps(obj, indent=2))
elif not obj['error']:
- return printer(obj['result'])
+ if not obj['result']:
+ print (Fore.RED + 'ERROR: malformed response, expected'
+ ' obj["result"]' + Fore.RESET)
+ else:
+ return printer(obj['result'])
else:
print Fore.RED + 'ERROR:' + '%s' % obj['error'] + Fore.RESET