mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
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:
parent
05d042765a
commit
d820ce15d0
@ -124,7 +124,7 @@ 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
|
||||
|
||||
|
||||
@ -135,9 +135,9 @@ 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
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user