Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: (minor) hwsku_json_checker and platform_json_checker have improper regex escape #49

Open
wdoekes opened this issue Nov 22, 2024 · 0 comments
Labels
has-fix Has a fix needs-upstream Has possible fixes but needs tickets/PRs upstream

Comments

@wdoekes
Copy link
Member

wdoekes commented Nov 22, 2024

Description

New python3 warnings.

--- a/src/sonic-device-data/tests/hwsku_json_checker
+++ b/src/sonic-device-data/tests/hwsku_json_checker
@@ -8,7 +8,7 @@ import sys
 # Global variable
 PORT_ATTRIBUTES = ["default_brkout_mode"]
 OPTIONAL_PORT_ATTRIBUTES = ["fec", "autoneg", "port_type", "subport", "role"]
-PORT_REG = "Ethernet(\d+)"
+PORT_REG = r"Ethernet(\d+)"
 HWSKU_JSON = '*hwsku.json'
 INTF_KEY = "interfaces"
 
diff --git a/src/sonic-device-data/tests/platform_json_checker b/src/sonic-device-data/tests/platform_json_checker
index 7b92936b9..f1865bf7b 100755
--- a/src/sonic-device-data/tests/platform_json_checker
+++ b/src/sonic-device-data/tests/platform_json_checker
@@ -8,7 +8,7 @@ import sys
 # Global variable
 PORT_ATTRIBUTES = ["index", "lanes", "breakout_modes"]
 ATTR_LEN = len(PORT_ATTRIBUTES)
-PORT_REG = "Ethernet(\d+)"
+PORT_REG = r"Ethernet(\d+)"
 PLATFORM_JSON = '*platform.json'
 INTF_KEY = "interfaces"
 CHASSIS_KEY = "chassis"

Needs PR upstream.

Which build are we running (if any)

master + 202405

Upstream issues/PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-fix Has a fix needs-upstream Has possible fixes but needs tickets/PRs upstream
Projects
None yet
Development

No branches or pull requests

1 participant