浏览代码

system namespace needed for 'all' functions

Chris McDonough 18 年之前
父节点
当前提交
f007401572
共有 1 个文件被更改,包括 8 次插入5 次删除
  1. 8 5
      src/supervisor/web.py

+ 8 - 5
src/supervisor/web.py

@@ -261,10 +261,10 @@ class StatusView(MeldView):
 
         # the rpc interface code is already written to deal properly in a
         # deferred world, so just use it
-        rpcinterface = xmlrpc.RootRPCInterface(
-            [('supervisor',
-              xmlrpc.SupervisorNamespaceRPCInterface(supervisord))]
-            )
+
+        supervisor_ns = ('supervisor', xmlrpc.SupervisorNamespaceRPCInterface(supervisord))
+        system_ns     = ('system',     xmlrpc.SystemNamespaceRPCInterface([supervisor_ns]))
+        rpcinterface = xmlrpc.RootRPCInterface([supervisor_ns, system_ns])
 
         if action:
 
@@ -387,7 +387,10 @@ class StatusView(MeldView):
                     response['headers']['Location'] = location
 
         supervisord = self.context.supervisord
-        rpcinterface = xmlrpc.RPCInterface(supervisord)
+        rpcinterface = xmlrpc.RootRPCInterface(
+            [('supervisor',
+              xmlrpc.SupervisorNamespaceRPCInterface(supervisord))]
+            )
 
         processnames = supervisord.processes.keys()
         processnames.sort()