Python 3.12 config parser changes

Changes:
     - ConfigParser readfp is no more in python 3.12
       made changes to replace with read_file

Tested:
     - Ran from sandbox with changes with levels
       Robot Framework 7.1.1 (Python 3.10.12 on linux)
       Robot Framework 7.1.1 (Python 3.12.9 on linux)

Change-Id: I9e29fdc84f27c004896cffb77cfde0ec786afa6c
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/gen_misc.py b/lib/gen_misc.py
index d7a6373..cc82034 100755
--- a/lib/gen_misc.py
+++ b/lib/gen_misc.py
@@ -306,13 +306,13 @@
 
     # Create the ConfigParser object.
     try:
-        config_parser = ConfigParser.ConfigParser()
+        config_parser = ConfigParser()
     except NameError:
         config_parser = configparser.ConfigParser(strict=False)
     # Make the property names case-sensitive.
     config_parser.optionxform = str
     # Read the properties from the string file.
-    config_parser.readfp(string_file)
+    config_parser.read_file(string_file)
     # Return the properties as a dictionary.
     if robot_env:
         return DotDict(config_parser.items("dummysection"))