cli: remove assertion in nmc_device_state_to_color()

nmcli should not fail when the state device state is > ACTIVATED.
Just return an unknown color code like we used to do, and like we do
for connections.

Fixes: 31aa2cfe29

https://bugzilla.gnome.org/show_bug.cgi?id=796834
This commit is contained in:
Beniamino Galvani 2018-08-09 20:37:32 +02:00
parent cf02b9c5df
commit c955d91d4b

View file

@ -1698,7 +1698,7 @@ nmc_device_state_to_color (NMDeviceState state)
else if (state == NM_DEVICE_STATE_ACTIVATED)
return NM_META_COLOR_DEVICE_ACTIVATED;
g_return_val_if_reached (NM_META_COLOR_DEVICE_UNKNOWN);
return NM_META_COLOR_DEVICE_UNKNOWN;
}
static NMCResultCode