Commit 46c82ab
authored
[db_migrator] Fix parse_xml fails when minigraph has SonicQosProfile (#3972)
This change is to fix #22120 "Bug: [db_migrator] parse_xml fails when minigraph has SonicQosProfile".
If there is `SonicQosProfile` in minigraph.xml, parse_xml fails with below error:
2025 Jul 14 06:49:23.590302 vlab-01 ERR db_migrator: Caught exception while trying to parse minigraph: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'
It's because select_mmu_profiles needs platform.
https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-config-engine/minigraph.py#L1925
This change added code to get platform info. While calling `parse_xml`, pass in the `platform` argument.
Signed-off-by: Xin Wang <xiwang5@microsoft.com>1 parent 1c3f789 commit 46c82ab
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
0 commit comments