Skip to content

Commit

Permalink
Fix sonic-cfggen --hwsku|-k command (sonic-net#33)
Browse files Browse the repository at this point in the history
Signed-off-by: Sangita Maity <sangitamaity0211@gmail.com>
  • Loading branch information
samaity authored and zhenggen-xu committed Jan 28, 2020
1 parent a8c2aee commit e540c31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sonic-config-engine/sonic-cfggen
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ from functools import partial
from minigraph import minigraph_encoder
from minigraph import parse_xml
from minigraph import parse_device_desc_xml
from portconfig import get_port_config, get_breakout_mode
from portconfig import get_port_config, get_port_config_file_name, get_breakout_mode
from sonic_device_util import get_machine_info
from sonic_device_util import get_platform_info
from sonic_device_util import get_system_mac
Expand Down Expand Up @@ -227,6 +227,8 @@ def main():
'hwsku': hwsku
}}}
deep_update(data, hardware_data)
if args.port_config is None:
args.port_config = get_port_config_file_name(hwsku, platform)
(ports, _) = get_port_config(hwsku, platform, args.port_config)
if not ports:
print('Failed to get port config', file=sys.stderr)
Expand Down

0 comments on commit e540c31

Please sign in to comment.