Minor PEP8 & spelling fixes in various modules

This commit is contained in:
Sunil Mohan Adapa 2016-02-28 19:27:49 +05:30
parent 711892486e
commit f04e1c1657
No known key found for this signature in database
GPG Key ID: 36C361440C9BC971
7 changed files with 6 additions and 9 deletions

View File

@ -23,8 +23,8 @@ from plinth import cfg
def init():
"""Initailize the apps module"""
cfg.main_menu.add_urlname(_('Apps'), 'glyphicon-download-alt', 'apps:index',
80)
cfg.main_menu.add_urlname(_('Apps'), 'glyphicon-download-alt',
'apps:index', 80)
def index(request):

View File

@ -226,7 +226,7 @@ def _apply_changes(request, old_status, new_status):
request.session[translation.LANGUAGE_SESSION_KEY] = language
except Exception as exception:
messages.error(request, _('Error setting language: {exception}')
.format(exception=exception))
.format(exception=exception))
else:
messages.success(request, _('Language changed'))

View File

@ -26,7 +26,7 @@ import plinth.service as service_module
def index(request):
"""Serve introcution page"""
"""Serve introduction page"""
if not firewall.get_enabled_status():
return TemplateResponse(request, 'firewall.html',
{'title': firewall.title,

View File

@ -20,7 +20,6 @@ Help module for Plinth.
"""
import os
from gettext import gettext as _
from django.http import Http404
from django.template.response import TemplateResponse
from django.utils.translation import ugettext as _, ugettext_lazy

View File

@ -116,7 +116,7 @@ def _collect_setup_result(request):
return_code = setup_process.poll()
# Setup process is not complete yet
if return_code == None:
if return_code is None:
return
if not return_code:

View File

@ -108,7 +108,7 @@ def _collect_config_result(request):
return_code = config_process.poll()
# Config process is not complete yet
if return_code == None:
if return_code is None:
return
status = tor.get_status()

View File

@ -67,5 +67,3 @@ def _diagnose_ldap_entry(search_item):
return [_('Check LDAP entry "{search_item}"')
.format(search_item=search_item), result]