Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/gen_call_robot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright (c) 2023, Arm Limited or its affiliates. All rights reserved.
# Copyright (c) 2023-2025, Arm Limited or its affiliates. All rights reserved.
# SPDX-License-Identifier : Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -20,7 +20,7 @@
robot program calls.
"""

import imp
import importlib.util
import os
import re
import subprocess
Expand All @@ -33,7 +33,7 @@
import gen_valid as gv

base_path = (
os.path.dirname(os.path.dirname(imp.find_module("gen_robot_print")[1]))
os.path.dirname(os.path.dirname(importlib.util.find_spec("gen_robot_print").origin))
+ os.sep
)

Expand Down
19 changes: 5 additions & 14 deletions lib/gen_misc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright (c) 2023, Arm Limited or its affiliates. All rights reserved.
# Copyright (c) 2023-2025, Arm Limited or its affiliates. All rights reserved.
# SPDX-License-Identifier : Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -31,14 +31,8 @@
import sys
import time

try:
import ConfigParser
except ImportError:
import configparser
try:
import StringIO
except ImportError:
import io
import configparser
from io import StringIO

import re
import socket
Expand Down Expand Up @@ -320,14 +314,11 @@ def my_parm_file(prop_file_path):
string_file.seek(0, os.SEEK_SET)

# Create the ConfigParser object.
try:
config_parser = ConfigParser.ConfigParser()
except NameError:
config_parser = configparser.ConfigParser(strict=False)
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"))
Expand Down
6 changes: 3 additions & 3 deletions lib/logging_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright (c) 2023, Arm Limited or its affiliates. All rights reserved.
# Copyright (c) 2023-2025, Arm Limited or its affiliates. All rights reserved.
# SPDX-License-Identifier : Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -19,15 +19,15 @@
Provide useful error log utility keywords.
"""

import imp
import importlib.util
import os
import sys

import gen_print as gp
from robot.libraries.BuiltIn import BuiltIn

base_path = (
os.path.dirname(os.path.dirname(imp.find_module("gen_robot_print")[1]))
os.path.dirname(os.path.dirname(importlib.util.find_spec("gen_robot_print").origin))
+ os.sep
)
sys.path.append(base_path + "data/")
Expand Down
6 changes: 3 additions & 3 deletions lib/obmc_boot_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright (c) 2023, Arm Limited or its affiliates. All rights reserved.
# Copyright (c) 2023-2025, Arm Limited or its affiliates. All rights reserved.
# SPDX-License-Identifier : Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -20,7 +20,7 @@
"""

import glob
import imp
import importlib.util
import os
import random
import re
Expand Down Expand Up @@ -50,7 +50,7 @@
from robot.utils import DotDict

base_path = (
os.path.dirname(os.path.dirname(imp.find_module("gen_robot_print")[1]))
os.path.dirname(os.path.dirname(importlib.util.find_spec("gen_robot_print").origin))
+ os.sep
)
sys.path.append(base_path + "extended/")
Expand Down
6 changes: 3 additions & 3 deletions lib/state.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright (c) 2023, Arm Limited or its affiliates. All rights reserved.
# Copyright (c) 2023-2025, Arm Limited or its affiliates. All rights reserved.
# SPDX-License-Identifier : Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -42,7 +42,7 @@
compared with the expected state.
"""

import imp
import importlib.util
import os
import re
import sys
Expand All @@ -56,7 +56,7 @@
from robot.utils import DotDict

base_path = (
os.path.dirname(os.path.dirname(imp.find_module("gen_robot_print")[1]))
os.path.dirname(os.path.dirname(importlib.util.find_spec("gen_robot_print").origin))
+ os.sep
)
sys.path.append(base_path + "data/")
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ click
PyYAML>=5.1
redfishtool
robotframework-selenium2library
webdrivermanager
webdriver-manager
robotframework-angularjs
robotframework-xvfb
redfish_utilities
Expand Down
Loading