File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 2828 error condition occurs. Previous versions did not set the exit status so
2929 it was always zero. Patch by Luke Weber.
3030
31+ - ``supervisorctl reload`` now gives an error message if an argument is
32+ given. Patch by Joel Krauska.
33+
31343.3.1 (2016-08-02)
3235------------------
3336
Original file line number Diff line number Diff line change @@ -984,10 +984,10 @@ def help_shutdown(self):
984984
985985 def do_reload (self , arg ):
986986 if arg :
987- self .ctl . output ('Error: reload given with a process name. Maybe you meant restart? ' )
987+ self .handle_error ('Error: reload accepts no arguments ' )
988988 self .help_reload ()
989989 return
990-
990+
991991 if self .ctl .options .interactive :
992992 yesno = raw_input ('Really restart the remote supervisord process '
993993 'y/N? ' )
Original file line number Diff line number Diff line change @@ -1287,6 +1287,14 @@ def test_reload(self):
12871287 self .assertEqual (result , None )
12881288 self .assertEqual (options ._server .supervisor ._restarted , True )
12891289
1290+ def test_reload_arg (self ):
1291+ plugin = self ._makeOne ()
1292+ result = plugin .do_reload ('bad' )
1293+ self .assertEqual (result , None )
1294+ val = plugin .ctl .stdout .getvalue ()
1295+ self .assertTrue (val .startswith ('Error: reload accepts no arguments' ), val )
1296+ self .assertEqual (plugin .ctl .exit_status , LSBInitErrorCode .GENERIC )
1297+
12901298 def test_shutdown_help (self ):
12911299 plugin = self ._makeOne ()
12921300 plugin .help_shutdown ()
You can’t perform that action at this time.
0 commit comments