Merge pull request #52513 from dwoz/supervisord_2019.2

[2019.2] Fix supervisord
This commit is contained in:
Daniel Wozniak 2019-04-11 14:09:16 -07:00 committed by GitHub
commit 1532642e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,10 +63,12 @@ def _ctl_cmd(cmd, name, conf_file, bin_env):
def _get_return(ret):
if ret['retcode'] == 0:
return ret['stdout']
else:
return ''
retmsg = ret['stdout']
if ret['retcode'] != 0:
# This is a non 0 exit code
if 'ERROR' not in retmsg:
retmsg = 'ERROR: {}'.format(retmsg)
return retmsg
def start(name='all', user=None, conf_file=None, bin_env=None):