Skip to content

Commit fd1f5ce

Browse files
committed
[sonic-cfggen] Allow cfggen to work on system without ports
Signed-off-by: liora <[email protected]>
1 parent db76a6f commit fd1f5ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/sonic-config-engine/sonic-cfggen

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ def main():
317317
if args.port_config is None:
318318
args.port_config = device_info.get_path_to_port_config_file(hwsku)
319319
(ports, _, _) = get_port_config(hwsku, platform, args.port_config, asic_id)
320+
if ports is None:
321+
print('Failed to get port config', file=sys.stderr)
322+
sys.exit(1)
320323
deep_update(data, {'PORT': ports})
321324

322325
brkout_table = get_breakout_mode(hwsku, platform, args.port_config)

0 commit comments

Comments
 (0)