diff options
author | Kali Kaneko <kali@leap.se> | 2013-09-03 11:25:02 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2013-09-03 11:25:02 +0200 |
commit | d7100189a3d572d0dbe20933d13f20b7decc2b68 (patch) | |
tree | 93bffe1ff83586f2aed6d5e6a75dd5abad5e9f3e /src/leap/bitmask/services | |
parent | ceeba60a8d37128d0609046089859d9a3d7dcfa3 (diff) | |
parent | e4e79e29c01e6389d37d12ed72b0ba9f972d2ede (diff) |
Merge remote-tracking branch 'ivan-github/bug/3657_display-correct-service-name-in-wizard' into develop
Diffstat (limited to 'src/leap/bitmask/services')
-rw-r--r-- | src/leap/bitmask/services/__init__.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/leap/bitmask/services/__init__.py b/src/leap/bitmask/services/__init__.py index 924ca547..339f9cc6 100644 --- a/src/leap/bitmask/services/__init__.py +++ b/src/leap/bitmask/services/__init__.py @@ -26,6 +26,8 @@ DEPLOYED = ["openvpn", "mx"] def get_service_display_name(service, standalone=False): """ Returns the name to display of the given service. + If there is no configured name for that service, then returns the same + parameter :param service: the 'machine' service name :type service: str @@ -42,8 +44,10 @@ def get_service_display_name(service, standalone=False): EIP_LABEL = _tr("Encrypted Internet") MX_LABEL = _tr("Encrypted Mail") - service_display = [EIP_LABEL, MX_LABEL] - service_config = ["openvpn", "mx"] + service_display = { + "openvpn": EIP_LABEL, + "mx": MX_LABEL + } # If we need to add a warning about eip needing # administrative permissions to start. That can be either @@ -52,7 +56,7 @@ def get_service_display_name(service, standalone=False): if standalone or is_missing_policy_permissions(): EIP_LABEL += " " + _tr("(will need admin password to start)") - return service_display[service_config.index(service)] + return service_display.get(service, service) def get_supported(services): |