Skip to content

Commit c885695

Browse files
authored
Correct the PCIe device name formatting in pcie_dev variable assignment (#647)
1 parent e930a64 commit c885695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sonic-pcied/scripts/pcied

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class DaemonPcied(daemon_base.DaemonBase):
200200
for result in self.resultInfo:
201201
if result["result"] == "Failed":
202202
# Convert bus, device, and function to a bus_info format like "0000:03:00.0"
203-
pcie_dev = "0000:{int(result['bus'], 16):02x}:{int(result['dev'], 16):02x}.{int(result['fn'], 16)}"
203+
pcie_dev = "0000:{:02x}:{:02x}.{}".format(int(result["bus"], 16), int(result["dev"], 16), int(result["fn"], 16))
204204

205205
# Check if the device is in detaching mode
206206
if device_info.is_smartswitch() and self.is_dpu_in_detaching_mode(pcie_dev):

0 commit comments

Comments
 (0)