Explorar o código

If not interactive, exit.

Chris McDonough %!s(int64=16) %!d(string=hai) anos
pai
achega
fa2c6bd29c
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/supervisor/supervisorctl.py

+ 2 - 0
src/supervisor/supervisorctl.py

@@ -175,6 +175,8 @@ class Controller(cmd.Cmd):
                 (file, fun, line), t, v, tbinfo = asyncore.compact_traceback()
                 error = 'error: %s, %s: file: %s line: %s' % (t, v, file, line)
                 self.output(error)
+                if not self.options.interactive:
+                    sys.exit(2)
 
     def _get_do_func(self, cmd):
         func_name = 'do_' + cmd