[elbe-devel] [PATCH 04/12] pylint esoap: fix signature of ESoap.get_files()

Bastian Germann bage at linutronix.de
Fri Sep 27 17:17:34 CEST 2019


> get_files had specified 2 String parameters and erratically added
> a _returns parameter to the functnion definition.

Typos: string (lower case), function

> 
> this mess was shadowed by "# pylint: disable=unused-argument", and
> the uid was not checked using open_project()
> 
> fix it up.
> 
> No change is needed on the caller side, because the parameter was optional,
> and never used.
> 
> 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 0f11a1f15..e3255b651 100644
> --- a/elbepack/daemons/soap/esoap.py
> +++ b/elbepack/daemons/soap/esoap.py
> @@ -114,11 +114,11 @@ class ESoap (ServiceBase):
>      def list_projects(self):
>          return self.app.pm.db.list_projects()
>  
> -    @rpc(String, String, _returns=Array(SoapFile))
> +    @rpc(String, _returns=Array(SoapFile))
>      @authenticated_uid
>      @soap_faults
> -    def get_files(self, uid, builddir, _returns=Array(SoapFile)):
> -        # pylint: disable=unused-argument
> +    def get_files(self, uid, builddir):
> +        self.app.pm.open_project(uid, builddir)
>          files = self.app.pm.db.get_project_files(builddir)
>          return [SoapFile(f) for f in files]
>  
> 



More information about the elbe-devel mailing list