From 728e1e4e136aab5b4d185c738de8df7bcdce18ee Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 4 Oct 2017 13:13:25 -0400 Subject: [PATCH] mgr: fix os._exit overrides These would throw an exception when passed a status code. Signed-off-by: John Spray (cherry picked from commit e2442c1e20bf4ff12d58af500b34a18cc60d2de1) --- src/pybind/mgr/dashboard/module.py | 2 +- src/pybind/mgr/prometheus/module.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/dashboard/module.py b/src/pybind/mgr/dashboard/module.py index 0cb92332837fc..526007e00f8d0 100644 --- a/src/pybind/mgr/dashboard/module.py +++ b/src/pybind/mgr/dashboard/module.py @@ -46,7 +46,7 @@ log = logging.getLogger("dashboard") LOG_BUFFER_SIZE = 30 # cherrypy likes to sys.exit on error. don't let it take us down too! -def os_exit_noop(): +def os_exit_noop(*args, **kwargs): pass os._exit = os_exit_noop diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index c086eaadf2989..842517f208f37 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -15,7 +15,7 @@ DEFAULT_PORT = 9283 # cherrypy likes to sys.exit on error. don't let it take us down too! -def os_exit_noop(): +def os_exit_noop(*args, **kwargs): pass -- 2.39.5