diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/component.py b/platform/mellanox/mlnx-platform-api/sonic_platform/component.py index 3b9ce86ac90..4befc799842 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/component.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/component.py @@ -172,7 +172,7 @@ def __mount_onie_fs(self): cmd1 = ['fdisk', '-l'] cmd2 = ['grep', 'ONIE boot'] cmd3 = ['awk', '{print $1}'] - fs_path = check_output_pipe(cmd1, cmd2, cmd3) + fs_path = check_output_pipe(cmd1, cmd2, cmd3).rstrip('\n') os.mkdir(fs_mountpoint) cmd = ["mount", "-n", "-r", "-t", "ext4", fs_path, fs_mountpoint]