diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2017-02-01 14:49:45 +0100 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2017-02-23 00:40:31 +0100 |
commit | 1d4a3d68869dd9c416b104399097a6bb0c1bace3 (patch) | |
tree | 9afc38280e17a84e55184f064cf34f1a490ac539 /src/leap/bitmask/cli/command.py | |
parent | 6d1d18faec5caa60c26b8245f0ab17c63d0b80d8 (diff) |
[feature] new commands: get_cert
Diffstat (limited to 'src/leap/bitmask/cli/command.py')
-rw-r--r-- | src/leap/bitmask/cli/command.py | 6 |
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 |