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

Torben Hohn torben.hohn at linutronix.de
Thu Sep 26 15:33:24 CEST 2019


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

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>
---
 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]
 
-- 
2.20.1




More information about the elbe-devel mailing list