From d4d7b65f2df4a7f4906f35bdb047d1a0265f8ebc Mon Sep 17 00:00:00 2001 From: Guytri Kastane Date: Fri, 30 Aug 2024 17:17:25 +0200 Subject: [PATCH] spns #41954: support Ubuntu 24.04 --- .../KERNEL-UB24.04-V9_13_0_configparser.patch | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/products/patches/KERNEL-UB24.04-V9_13_0_configparser.patch b/products/patches/KERNEL-UB24.04-V9_13_0_configparser.patch index ca61f61..6ed89b3 100644 --- a/products/patches/KERNEL-UB24.04-V9_13_0_configparser.patch +++ b/products/patches/KERNEL-UB24.04-V9_13_0_configparser.patch @@ -1,5 +1,5 @@ diff --git a/bin/parseConfigFile.py b/bin/parseConfigFile.py -index 20d782c8c..adf1809c8 100644 +index 20d782c8c..9be59649f 100644 --- a/bin/parseConfigFile.py +++ b/bin/parseConfigFile.py @@ -17,8 +17,13 @@ @@ -11,9 +11,9 @@ index 20d782c8c..adf1809c8 100644 +import sys +import configparser +if sys.version_info[:2] >= (3,12): -+ import configparser.ConfigParser as SafeConfigParser ++ from configparser import ConfigParser as SafeConfigParser +else: -+ import configparser.SafeConfigParser ++ from configparser import SafeConfigParser import logging import re from io import StringIO @@ -30,21 +30,22 @@ index 20d782c8c..adf1809c8 100644 # copied from python 2.6.8 Lib.ConfigParser.py # modified (see code comments) to handle duplicate keys diff --git a/bin/salomeContext.py b/bin/salomeContext.py -index 04f960e31..fa95889c5 100755 +index 04f960e31..273e4ef66 100755 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py -@@ -22,6 +22,10 @@ import os +@@ -22,7 +22,10 @@ import os import sys import logging import configparser +- +if sys.version_info[:2] >= (3,12): -+ import configparser.ConfigParser as SafeConfigParser ++ from configparser import ConfigParser as SafeConfigParser +else: -+ import configparser.SafeConfigParser - ++ from configparser import SafeConfigParser from parseConfigFile import parseConfigFile -@@ -542,7 +546,7 @@ class SalomeContext: + import tempfile +@@ -542,7 +545,7 @@ class SalomeContext: # def _showSoftwareVersions(self, softwares=None): -- 2.39.2