X-Git-Url: http://git.onelab.eu/?p=monitor.git;a=blobdiff_plain;f=web%2FMonitorWeb%2Fmonitorweb%2Fmonitor_xmlrpc.py;fp=web%2FMonitorWeb%2Fmonitorweb%2Fmonitor_xmlrpc.py;h=7d04c48538f8b213f59c3a10b882b4b5666e4f86;hp=2f4687921bae283574cb0d5e7a5bb0d224b5c5a6;hb=f6e368170a4e55dc0f6ccd51bf419ceec99e85c6;hpb=f0b0b138c0a466eb3c15ae172ae77597dc376159 diff --git a/web/MonitorWeb/monitorweb/monitor_xmlrpc.py b/web/MonitorWeb/monitorweb/monitor_xmlrpc.py index 2f46879..7d04c48 100644 --- a/web/MonitorWeb/monitorweb/monitor_xmlrpc.py +++ b/web/MonitorWeb/monitorweb/monitor_xmlrpc.py @@ -98,7 +98,10 @@ class MonitorXmlrpcServer(object): if method is None or not getattr(method, "exposed", False): raise AssertionError("method does not exist") - session.clear() + try: + session.expunge_all() + except AttributeError: # SQLAlchemy < 0.5.1 + session.clear() # Call the method, convert it into a 1-element tuple # as expected by dumps response = method(*params)