Skip to content

Commit 17a0d04

Browse files
committed
Fixes from testing
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
1 parent 06983e4 commit 17a0d04

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/sonic-config-engine/sonic-cfggen

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,19 +276,17 @@ def main():
276276
deep_update(data, FormatConverter.db_to_output(configdb.get_config()))
277277

278278

279-
# for multi Asic platforms to generate the platform info for an Asic
280-
# the minigraph file must be provided
279+
# the minigraph file must be provided to get the mac address for backend asics
281280
if args.platform_info:
282281
asic_role = None
283-
mac = None
284282
if asic_name is not None:
285-
if args.minigraph is None:
286-
print('Failed to get minigraph')
287-
sys.exit(1)
288-
asic_role = parse_asic_sub_role(args.minigraph, asic_name)
283+
if args.minigraph is not None:
284+
asic_role = parse_asic_sub_role(args.minigraph, asic_name)
289285

290-
if asic_role is not None and asic_role.lower() == "backend":
291-
mac = get_system_mac(namespace=asic_name)
286+
if asic_role is not None and asic_role.lower() == "backend":
287+
mac = get_system_mac(namespace=asic_name)
288+
else:
289+
mac = get_system_mac()
292290
else:
293291
mac = get_system_mac()
294292

0 commit comments

Comments
 (0)