From d820ce15d0c2f4023818394b811c01de17f963bd Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 9 Jul 2019 12:43:30 -0700 Subject: [PATCH] names: Minor styling fixes Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/names/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plinth/modules/names/__init__.py b/plinth/modules/names/__init__.py index 8ae0617a6..89e47d92f 100644 --- a/plinth/modules/names/__init__.py +++ b/plinth/modules/names/__init__.py @@ -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):