From 1a640be9fb1538775063544c1f3604ba946614a2 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Mon, 12 Feb 2024 11:03:03 +0100 Subject: [PATCH] VR: fix health check error due to deprecated SafeConfigParser warning below ``` root@r-20-VM:~# /opt/cloud/bin/getRouterMonitorResults.sh true /root/monitorServices.py:59: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in Python 3.12. Use ConfigParser directly instead. parser = SafeConfigParser() ``` --- systemvm/debian/root/monitorServices.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systemvm/debian/root/monitorServices.py b/systemvm/debian/root/monitorServices.py index 6f9f4ac522d3..11169d4bdb88 100755 --- a/systemvm/debian/root/monitorServices.py +++ b/systemvm/debian/root/monitorServices.py @@ -16,7 +16,7 @@ # specific language governing permissions and limitations # under the License. -from configparser import SafeConfigParser +from configparser import ConfigParser from subprocess import * from datetime import datetime import time @@ -56,7 +56,7 @@ def getServicesConfig( config_file_path = "/etc/monitor.conf" ): """ process_dict = {} - parser = SafeConfigParser() + parser = ConfigParser() parser.read( config_file_path )