Browse Source

Fix failing test: test_sendProcessSignal

and make sendProcessSignal return True
Marc Abramowitz 10 năm trước cách đây
mục cha
commit
e34d41c2a0
2 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 2 0
      supervisor/rpcinterface.py
  2. 1 1
      supervisor/tests/test_rpcinterfaces.py

+ 2 - 0
supervisor/rpcinterface.py

@@ -497,6 +497,8 @@ class SupervisorNamespaceRPCInterface:
         if not msg is None:
             raise RPCError(Faults.FAILED, msg)
 
+        return True
+
 
     def sendGroupSignal(self, name, signal='HUP'):
         """ Send a signal to all processes in the group named 'name'

+ 1 - 1
supervisor/tests/test_rpcinterfaces.py

@@ -847,7 +847,7 @@ class SupervisorNamespaceXMLRPCInterfaceTests(TestBase):
         supervisord.set_procattr('foo', 'state', ProcessStates.RUNNING)
         interface = self._makeOne(supervisord)
 
-        result = interface.sendProcessSignal('foo', 10)()
+        result = interface.sendProcessSignal('foo', 10)
 
         self.assertEqual(interface.update_text, 'sendProcessSignal')
         self.assertEqual(result, True)