Selaa lähdekoodia

Use childutils.eventdata instead of doing it ourselves.

Chris McDonough 17 vuotta sitten
vanhempi
commit
9ffa79ff48
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1 2
      src/supervisor/scripts/loop_listener.py

+ 1 - 2
src/supervisor/scripts/loop_listener.py

@@ -26,8 +26,7 @@ def main():
     while 1:
         headers, payload = childutils.protocol.wait()
         if headers['eventname'].startswith('PROCESS_COMMUNICATION'):
-            pheaderinfo, pdata = payload.split('\n')
-            pheaders = childutils.get_headers(pheaderinfo)
+            pheaders, pdata = childutils.eventdata(payload)
             pname = '%s:%s' % (pheaders['processname'], pheaders['groupname'])
             rpcinterface.supervisor.sendProcessStdin(pname, 'Got it yo\n')
         childutils.protocol.ok()