[elbe-devel] [PATCH 3/6] elbepack: soap: remove cherrypy plugin

Thomas Weißschuh thomas.weissschuh at linutronix.de
Tue Jun 25 16:25:35 CEST 2024


The only functionality use from "cherrypy.SimplePlugin" was the message
bus. With that usage gone, get rid of the plugin usage.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/daemons/soap/__init__.py | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/elbepack/daemons/soap/__init__.py b/elbepack/daemons/soap/__init__.py
index 7062b6d02443..055543a69962 100644
--- a/elbepack/daemons/soap/__init__.py
+++ b/elbepack/daemons/soap/__init__.py
@@ -6,8 +6,6 @@ import logging
 
 from beaker.middleware import SessionMiddleware
 
-from cherrypy.process.plugins import SimplePlugin
-
 from spyne import Application
 from spyne.protocol.soap import Soap11
 from spyne.server.wsgi import WsgiApplication
@@ -25,19 +23,14 @@ class EsoapApp(Application):
         self.pm = ProjectManager('/var/cache/elbe')
 
 
-class MySession (SessionMiddleware, SimplePlugin):
-    def __init__(self, app, pm, engine):
+class MySession(SessionMiddleware):
+    def __init__(self, app, pm):
         self.pm = pm
-        SessionMiddleware.__init__(self, app)
-
-        SimplePlugin.__init__(self, engine)
+        super().__init__(app)
 
     def stop(self):
         self.pm.stop()
 
-    def __call__(self, environ, start_response):
-        return SessionMiddleware.__call__(self, environ, start_response)
-
 
 def get_app(engine):
 
@@ -46,4 +39,4 @@ def get_app(engine):
                    out_protocol=Soap11())
 
     wsgi = WsgiApplication(app)
-    return MySession(wsgi, app.pm, engine)
+    return MySession(wsgi, app.pm)

-- 
2.45.2



More information about the elbe-devel mailing list