mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
Minor PEP8 & spelling fixes in various modules
This commit is contained in:
parent
711892486e
commit
f04e1c1657
@ -23,8 +23,8 @@ from plinth import cfg
|
|||||||
|
|
||||||
def init():
|
def init():
|
||||||
"""Initailize the apps module"""
|
"""Initailize the apps module"""
|
||||||
cfg.main_menu.add_urlname(_('Apps'), 'glyphicon-download-alt', 'apps:index',
|
cfg.main_menu.add_urlname(_('Apps'), 'glyphicon-download-alt',
|
||||||
80)
|
'apps:index', 80)
|
||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
|
|||||||
@ -226,7 +226,7 @@ def _apply_changes(request, old_status, new_status):
|
|||||||
request.session[translation.LANGUAGE_SESSION_KEY] = language
|
request.session[translation.LANGUAGE_SESSION_KEY] = language
|
||||||
except Exception as exception:
|
except Exception as exception:
|
||||||
messages.error(request, _('Error setting language: {exception}')
|
messages.error(request, _('Error setting language: {exception}')
|
||||||
.format(exception=exception))
|
.format(exception=exception))
|
||||||
else:
|
else:
|
||||||
messages.success(request, _('Language changed'))
|
messages.success(request, _('Language changed'))
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ import plinth.service as service_module
|
|||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
"""Serve introcution page"""
|
"""Serve introduction page"""
|
||||||
if not firewall.get_enabled_status():
|
if not firewall.get_enabled_status():
|
||||||
return TemplateResponse(request, 'firewall.html',
|
return TemplateResponse(request, 'firewall.html',
|
||||||
{'title': firewall.title,
|
{'title': firewall.title,
|
||||||
|
|||||||
@ -20,7 +20,6 @@ Help module for Plinth.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from gettext import gettext as _
|
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
from django.template.response import TemplateResponse
|
from django.template.response import TemplateResponse
|
||||||
from django.utils.translation import ugettext as _, ugettext_lazy
|
from django.utils.translation import ugettext as _, ugettext_lazy
|
||||||
|
|||||||
@ -116,7 +116,7 @@ def _collect_setup_result(request):
|
|||||||
return_code = setup_process.poll()
|
return_code = setup_process.poll()
|
||||||
|
|
||||||
# Setup process is not complete yet
|
# Setup process is not complete yet
|
||||||
if return_code == None:
|
if return_code is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
if not return_code:
|
if not return_code:
|
||||||
|
|||||||
@ -108,7 +108,7 @@ def _collect_config_result(request):
|
|||||||
return_code = config_process.poll()
|
return_code = config_process.poll()
|
||||||
|
|
||||||
# Config process is not complete yet
|
# Config process is not complete yet
|
||||||
if return_code == None:
|
if return_code is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
status = tor.get_status()
|
status = tor.get_status()
|
||||||
|
|||||||
@ -67,5 +67,3 @@ def _diagnose_ldap_entry(search_item):
|
|||||||
|
|
||||||
return [_('Check LDAP entry "{search_item}"')
|
return [_('Check LDAP entry "{search_item}"')
|
||||||
.format(search_item=search_item), result]
|
.format(search_item=search_item), result]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user