Browse Source

The channel is already implied by the event type.

Chris McDonough 18 years ago
parent
commit
7c59ea9968
2 changed files with 3 additions and 7 deletions
  1. 1 3
      src/supervisor/events.py
  2. 2 4
      src/supervisor/tests/test_events.py

+ 1 - 3
src/supervisor/events.py

@@ -48,7 +48,6 @@ class ProcessCommunicationEvent(Event):
     # event mode tokens
     BEGIN_TOKEN = '<!--XSUPERVISOR:BEGIN-->'
     END_TOKEN   = '<!--XSUPERVISOR:END-->'
-    channel = None # this is abstract
     def __init__(self, process, data):
         self.process = process
         self.data = data
@@ -57,10 +56,9 @@ class ProcessCommunicationEvent(Event):
         groupname = ''
         if self.process.group is not None:
             groupname = self.process.group.config.name
-        return 'process_name: %s\ngroup_name: %s\nchannel: %s\n%s' % (
+        return 'process_name: %s\ngroup_name: %s\n%s' % (
             self.process.config.name,
             groupname,
-            self.channel,
             self.data)
 
 class ProcessCommunicationStdoutEvent(ProcessCommunicationEvent):

+ 2 - 4
src/supervisor/tests/test_events.py

@@ -106,8 +106,7 @@ class TestSerializations(unittest.TestCase):
         process1.group = DummyGroup
         event = ProcessCommunicationStdoutEvent(process1, 'yo')
         self.assertEqual(str(event),
-                         'process_name: process1\ngroup_name: process1\n'
-                         'channel: stdout\nyo'
+                         'process_name: process1\ngroup_name: process1\nyo'
                          )
             
     def test_pcomm_stderr_event(self):
@@ -120,8 +119,7 @@ class TestSerializations(unittest.TestCase):
         from supervisor.events import ProcessCommunicationStderrEvent
         event = ProcessCommunicationStderrEvent(process1, 'yo')
         self.assertEqual(str(event),
-                         'process_name: process1\ngroup_name: process1\n'
-                         'channel: stderr\nyo'
+                         'process_name: process1\ngroup_name: process1\nyo'
                          )
 
     def test_overflow_event(self):