Skip to content

Commit 51caeb7

Browse files
jkrauskamnaberez
authored andcommitted
Exit if args given to reload
Users can accidentally confuse reload (reload the entire supervisor and all children) with restart (restart a single child). This keeps reload from working if a trailing argument is given.
1 parent c3a8846 commit 51caeb7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

supervisor/supervisorctl.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,11 @@ def help_shutdown(self):
983983
self.ctl.output("shutdown \tShut the remote supervisord down.")
984984

985985
def do_reload(self, arg):
986+
if arg:
987+
self.ctl.output('Error: reload given with a process name. Maybe you meant restart?')
988+
self.help_reload()
989+
return
990+
986991
if self.ctl.options.interactive:
987992
yesno = raw_input('Really restart the remote supervisord process '
988993
'y/N? ')

0 commit comments

Comments
 (0)