Python3.13 telnetlib error and TypeError
Changes:
- OpenBMC test supports two methods of FFDC
1) robot code
2) python cli code
The python cli log collection is the one causing
the error since telnetlib package if no longer
supported on Python 3.13 version.
Currently commented to allow the CI test to stop
invoking the python import for FFDC.
- Added TypeError handling in python code path for
boot test.
Tested:
- Ran on Python 3.13.3
(main, Aug 14 2025, 11:53:40) [GCC 14.2.0]
Change-Id: I806895993d8c9360527a8d91f804409b99fc09d6
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/gen_robot_valid.py b/lib/gen_robot_valid.py
index c25d9ab..f57ba78 100755
--- a/lib/gen_robot_valid.py
+++ b/lib/gen_robot_valid.py
@@ -113,11 +113,15 @@
),
None,
)
- # Replace the "var_value" line with our "var_name" line.
- doc_string[start_ix] = (
- " var_name "
- + "The name of the variable to be validated."
- )
+ # If we don't find the var_value in the string, return as it is.
+ try:
+ # Replace the "var_value" line with our "var_name" line.
+ doc_string[start_ix] = (
+ " var_name "
+ + "The name of the variable to be validated."
+ )
+ except TypeError:
+ pass
return "\n".join(doc_string)
diff --git a/lib/openbmc_ffdc.robot b/lib/openbmc_ffdc.robot
index f2dfc8f..5480deb 100755
--- a/lib/openbmc_ffdc.robot
+++ b/lib/openbmc_ffdc.robot
@@ -33,7 +33,9 @@
Resource openbmc_ffdc_utils.robot
Resource dump_utils.robot
Library openbmc_ffdc.py
-Library ffdc_cli_robot_script.py
+# TODO:
+# telnetlib is remove in Python3.13 version.
+#Library ffdc_cli_robot_script.py
*** Keywords ***
@@ -64,5 +66,7 @@
... FFDC_DEFAULT:0 use new ffdc collector.
Run Keyword If ${FFDC_DEFAULT} == ${1} FFDC # Keyword from openbmc_ffdc.py
- ... ELSE ffdc_robot_script_cli # Keyword from ffdc_cli_robot_script.py
+
+ # TODO: Python 3.13 compatibility changes needed
+ # ... ELSE ffdc_robot_script_cli # Keyword from ffdc_cli_robot_script.py