[elbe-devel] [PATCH 05/12] pylint esoap: mak shutdown_initvm() @authenticated_admin and no-self-use
Bastian Germann
bage at linutronix.de
Fri Sep 27 17:18:42 CEST 2019
Typo in the subject: mak -> make
> shutdown_initvm is only supposed to be called by an admin, and it
> did not evaluate the uid anyways.
>
> switch to @authenticated_admin and ignore the no-self-use pylint message
>
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
With this change
Reviewed-by: Bastian Germann <bage at linutronix.de>
> ---
> elbepack/daemons/soap/esoap.py | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/elbepack/daemons/soap/esoap.py b/elbepack/daemons/soap/esoap.py
> index e3255b651..aeb43e418 100644
> --- a/elbepack/daemons/soap/esoap.py
> +++ b/elbepack/daemons/soap/esoap.py
> @@ -379,10 +379,10 @@ class ESoap (ServiceBase):
> return msg
>
> @rpc()
> - @authenticated_uid
> + @authenticated_admin
> @soap_faults
> - def shutdown_initvm(self, uid):
> - # pylint: disable=unused-argument
> + def shutdown_initvm(self):
> + # pylint: disable=no-self-use
> system("systemctl --no-block poweroff")
>
> @rpc(String)
>
More information about the elbe-devel
mailing list