mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +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
|
||||
@require()
|
||||
def index(self, **kwargs):
|
||||
def index(self):
|
||||
"""Serve introcution page"""
|
||||
del kwargs # Unused
|
||||
|
||||
if not self.get_installed_status():
|
||||
return util.render_template(template='firewall',
|
||||
title=_("Firewall"),
|
||||
|
||||
@ -58,10 +58,8 @@ class Packages(PagePlugin):
|
||||
|
||||
@cherrypy.expose
|
||||
@require()
|
||||
def index(self, *args, **kwargs):
|
||||
def index(self, **kwargs):
|
||||
"""Serve the form"""
|
||||
del args # Unused
|
||||
|
||||
status = self.get_status()
|
||||
|
||||
form = None
|
||||
|
||||
@ -46,10 +46,8 @@ class PageKite(PagePlugin):
|
||||
@staticmethod
|
||||
@cherrypy.expose
|
||||
@require()
|
||||
def index(**kwargs):
|
||||
def index():
|
||||
"""Serve introdution page"""
|
||||
del kwargs # Unused
|
||||
|
||||
menu = {'title': _('PageKite'),
|
||||
'items': [{'url': '/apps/pagekite/configure',
|
||||
'text': _('Configure PageKite')}]}
|
||||
|
||||
@ -40,9 +40,8 @@ class XMPP(PagePlugin):
|
||||
@staticmethod
|
||||
@cherrypy.expose
|
||||
@require()
|
||||
def index(**kwargs):
|
||||
def index():
|
||||
"""Serve XMPP page"""
|
||||
del kwargs # Unused
|
||||
main = "<p>XMPP Server Accounts and Configuration</p>"
|
||||
|
||||
sidebar_right = util.render_template(template='menu_block',
|
||||
@ -107,13 +106,6 @@ class Configure(PagePlugin):
|
||||
|
||||
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
|
||||
def _apply_changes(old_status, new_status, messages):
|
||||
"""Apply the form changes"""
|
||||
@ -133,7 +125,7 @@ class Configure(PagePlugin):
|
||||
cfg.log.info('Option - %s' % option)
|
||||
|
||||
_output, error = actions.superuser_run('xmpp-setup', [option])
|
||||
del _output
|
||||
del _output # Unused
|
||||
if error:
|
||||
raise Exception('Error running command - %s' % error)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user