Переглянути джерело

- Supervisorctl now correctly interprets all of the error codes that can
be returned when starting a process. Patch by Francesc Alted.

Mike Naberezny 16 роки тому
батько
коміт
70dcf9ec15
2 змінених файлів з 9 додано та 2 видалено
  1. 3 0
      CHANGES.txt
  2. 6 2
      src/supervisor/supervisorctl.py

+ 3 - 0
CHANGES.txt

@@ -1,5 +1,8 @@
 Next Release
 
+  - Supervisorctl now correctly interprets all of the error codes that can
+    be returned when starting a process.  Patch by Francesc Alted.
+
   - New 'stdout_events_enabled' and 'stderr_events_enabled' config options
     have been added to the '[program:x]', '[fcgi-program:x]', and 
     '[eventlistener:x]' sections.  These enable the emitting of new 

+ 6 - 2
src/supervisor/supervisorctl.py

@@ -609,9 +609,13 @@ class DefaultControllerPlugin(ControllerPluginBase):
         code = result['status']
         template = '%s: ERROR (%s)'
         if code == xmlrpc.Faults.BAD_NAME:
-            return template % (name,'no such process')
+            return template % (name, 'no such process')
+        elif code == xmlrpc.Faults.NO_FILE:
+            return template % (name, 'no such file')
+        elif code == xmlrpc.Faults.NOT_EXECUTABLE:
+            return template % (name, 'file is not executable')
         elif code == xmlrpc.Faults.ALREADY_STARTED:
-            return template % (name,'already started')
+            return template % (name, 'already started')
         elif code == xmlrpc.Faults.SPAWN_ERROR:
             return template % (name, 'spawn error')
         elif code == xmlrpc.Faults.ABNORMAL_TERMINATION: