names: Minor styling fixes

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2019-07-09 12:43:30 -07:00 committed by James Valleroy
parent 05d042765a
commit d820ce15d0
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -124,8 +124,8 @@ def get_description(domain_type):
"""Get description of a domain_type, if available."""
if domain_type in domain_types:
return domain_types[domain_type]
else:
return domain_type
return domain_type
def get_domain(domain_type):
@ -135,10 +135,10 @@ def get_domain(domain_type):
This function is meant for use with single-domain domain_types. If there is
more than one domain, any one of the domains may be returned.
"""
if domain_type in domains and len(domains[domain_type]) > 0:
if domain_type in domains and domains[domain_type]:
return list(domains[domain_type].keys())[0]
else:
return None
return None
def get_enabled_services(domain_type, domain):