mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
Don't take unnecessary kwargs in exposed methods
This commit is contained in:
parent
ef493ae243
commit
3e32715a55
@ -45,10 +45,8 @@ class Firewall(PagePlugin):
|
|||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
@require()
|
@require()
|
||||||
def index(self, **kwargs):
|
def index(self):
|
||||||
"""Serve introcution page"""
|
"""Serve introcution page"""
|
||||||
del kwargs # Unused
|
|
||||||
|
|
||||||
if not self.get_installed_status():
|
if not self.get_installed_status():
|
||||||
return util.render_template(template='firewall',
|
return util.render_template(template='firewall',
|
||||||
title=_("Firewall"),
|
title=_("Firewall"),
|
||||||
|
|||||||
@ -58,10 +58,8 @@ class Packages(PagePlugin):
|
|||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
@require()
|
@require()
|
||||||
def index(self, *args, **kwargs):
|
def index(self, **kwargs):
|
||||||
"""Serve the form"""
|
"""Serve the form"""
|
||||||
del args # Unused
|
|
||||||
|
|
||||||
status = self.get_status()
|
status = self.get_status()
|
||||||
|
|
||||||
form = None
|
form = None
|
||||||
|
|||||||
@ -46,10 +46,8 @@ class PageKite(PagePlugin):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
@require()
|
@require()
|
||||||
def index(**kwargs):
|
def index():
|
||||||
"""Serve introdution page"""
|
"""Serve introdution page"""
|
||||||
del kwargs # Unused
|
|
||||||
|
|
||||||
menu = {'title': _('PageKite'),
|
menu = {'title': _('PageKite'),
|
||||||
'items': [{'url': '/apps/pagekite/configure',
|
'items': [{'url': '/apps/pagekite/configure',
|
||||||
'text': _('Configure PageKite')}]}
|
'text': _('Configure PageKite')}]}
|
||||||
|
|||||||
@ -40,9 +40,8 @@ class XMPP(PagePlugin):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
@require()
|
@require()
|
||||||
def index(**kwargs):
|
def index():
|
||||||
"""Serve XMPP page"""
|
"""Serve XMPP page"""
|
||||||
del kwargs # Unused
|
|
||||||
main = "<p>XMPP Server Accounts and Configuration</p>"
|
main = "<p>XMPP Server Accounts and Configuration</p>"
|
||||||
|
|
||||||
sidebar_right = util.render_template(template='menu_block',
|
sidebar_right = util.render_template(template='menu_block',
|
||||||
@ -107,13 +106,6 @@ class Configure(PagePlugin):
|
|||||||
|
|
||||||
return {'inband_enabled': 'inband_enable' in output.split()}
|
return {'inband_enabled': 'inband_enable' in output.split()}
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def sidebar_right(**kwargs):
|
|
||||||
"""Return rendered string for sidebar on the right"""
|
|
||||||
del kwargs # Unused
|
|
||||||
|
|
||||||
return util.render_template(template='menu_block', menu=SIDE_MENU)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _apply_changes(old_status, new_status, messages):
|
def _apply_changes(old_status, new_status, messages):
|
||||||
"""Apply the form changes"""
|
"""Apply the form changes"""
|
||||||
@ -133,7 +125,7 @@ class Configure(PagePlugin):
|
|||||||
cfg.log.info('Option - %s' % option)
|
cfg.log.info('Option - %s' % option)
|
||||||
|
|
||||||
_output, error = actions.superuser_run('xmpp-setup', [option])
|
_output, error = actions.superuser_run('xmpp-setup', [option])
|
||||||
del _output
|
del _output # Unused
|
||||||
if error:
|
if error:
|
||||||
raise Exception('Error running command - %s' % error)
|
raise Exception('Error running command - %s' % error)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user