diff options
Diffstat (limited to 'src/leap/bitmask/cli')
-rw-r--r-- | src/leap/bitmask/cli/command.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/leap/bitmask/cli/command.py b/src/leap/bitmask/cli/command.py index 77d2bdfc..cc3514b0 100644 --- a/src/leap/bitmask/cli/command.py +++ b/src/leap/bitmask/cli/command.py @@ -148,9 +148,12 @@ class Command(object): if self.print_json: print(json.dumps(obj, indent=2)) elif not obj['error']: - if not obj['result']: + if 'result' not in obj: print (Fore.RED + 'ERROR: malformed response, expected' ' obj["result"]' + Fore.RESET) + elif obj['result'] is None: + print (Fore.RED + 'ERROR: empty response. Check logs.' + + Fore.RESET) else: return printer(obj['result']) else: |