diff options
| author | Emīls Piņķis <emils@mullvad.net> | 2019-01-09 12:35:43 +0000 |
|---|---|---|
| committer | Emīls Piņķis <emils@mullvad.net> | 2019-01-09 12:35:43 +0000 |
| commit | e0ca3662e1ea57ef09001ab1b8a4b529dcdd72cf (patch) | |
| tree | 4770c52ca63514d41d41800f45a23d0870b80117 /mullvad-cli | |
| parent | 74da64ba1e1f0dda1ac94dfdf5eead7a41576e68 (diff) | |
| parent | ebfd4edf81e8ddeafed3304410636fc2033bf265 (diff) | |
| download | mullvadvpn-e0ca3662e1ea57ef09001ab1b8a4b529dcdd72cf.tar.xz mullvadvpn-e0ca3662e1ea57ef09001ab1b8a4b529dcdd72cf.zip | |
Merge branch 'adjust-current-locaiton-rpc'
Diffstat (limited to 'mullvad-cli')
| -rw-r--r-- | mullvad-cli/src/cmds/status.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mullvad-cli/src/cmds/status.rs b/mullvad-cli/src/cmds/status.rs index 26b2cf7f06..9c022a38d8 100644 --- a/mullvad-cli/src/cmds/status.rs +++ b/mullvad-cli/src/cmds/status.rs @@ -65,7 +65,13 @@ fn print_blocked_reason(reason: &BlockReason) { } fn print_location(rpc: &mut DaemonRpcClient) -> Result<()> { - let location = rpc.get_current_location()?; + let location = match rpc.get_current_location()? { + Some(loc) => loc, + None => { + println!("Location data unavailable"); + return Ok(()); + } + }; let city_and_country = if let Some(city) = location.city { format!("{}, {}", city, location.country) } else { |
