diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2017-06-01 03:06:51 +0200 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2017-06-01 03:33:40 +0200 |
commit | 820709938e4313e04bab160115cc215769c3a1fb (patch) | |
tree | 92adb569fc1433da6f7c1bfbc3313dfbed9a8352 /src/leap/bitmask/cli | |
parent | 2db7202e6c3a520a5b6fe395dd74d40d8e53c481 (diff) |
[refactor] improve error reporting when openvpn not found
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 77d2bdf..cc3514b 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: |