瀏覽代碼

Return name with all NOT_RUNNING and STILL_RUNNING faults

Mike Naberezny 9 年之前
父節點
當前提交
8081679ab7
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      supervisor/rpcinterface.py

+ 3 - 3
supervisor/rpcinterface.py

@@ -209,7 +209,7 @@ class SupervisorNamespaceRPCInterface:
 
         result = self.supervisord.remove_process_group(name)
         if not result:
-            raise RPCError(Faults.STILL_RUNNING)
+            raise RPCError(Faults.STILL_RUNNING, name)
         return True
 
     def _getAllProcesses(self, lexical=False):
@@ -387,7 +387,7 @@ class SupervisorNamespaceRPCInterface:
             return self.stopProcessGroup(group_name, wait)
 
         if process.get_state() not in RUNNING_STATES:
-            raise RPCError(Faults.NOT_RUNNING)
+            raise RPCError(Faults.NOT_RUNNING, name)
 
         msg = process.stop()
         if msg is not None:
@@ -486,7 +486,7 @@ class SupervisorNamespaceRPCInterface:
             raise RPCError(Faults.BAD_SIGNAL, signal)
 
         if process.get_state() not in RUNNING_STATES:
-            raise RPCError(Faults.NOT_RUNNING)
+            raise RPCError(Faults.NOT_RUNNING, name)
 
         msg = process.signal(sig)