[elbe-devel] [PATCH v2 11/27] daemons soap: ignore ResourceWarning and PendingDeprecationWarning

Torben Hohn torben.hohn at linutronix.de
Thu Sep 24 16:56:08 CEST 2020


PendingDeprecationWarning is caused by cherrypy during a reload
because it call isAlive() instead of is_alive()

ResourceWarning is issued, when files are not closed properly,
and its left to garbagecollection to close them.
When the rpcaptcache is committed, a ResourceWarning is issued.

ignore them.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/daemons/soap/__init__.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/elbepack/daemons/soap/__init__.py b/elbepack/daemons/soap/__init__.py
index 01500f374..ebe73f235 100644
--- a/elbepack/daemons/soap/__init__.py
+++ b/elbepack/daemons/soap/__init__.py
@@ -6,6 +6,7 @@
 
 import sys
 import logging
+import warnings
 
 from beaker.middleware import SessionMiddleware
 from cherrypy.process.plugins import SimplePlugin
@@ -26,6 +27,8 @@ except ImportError as e:
 
 logging.getLogger('spyne').setLevel(logging.INFO)
 
+warnings.simplefilter('ignore', category=PendingDeprecationWarning)
+warnings.simplefilter('ignore', category=ResourceWarning)
 
 class EsoapApp(Application):
     def __init__(self, *args, **kargs):
-- 
2.20.1



More information about the elbe-devel mailing list