Skip to content

Commit c4b623d

Browse files
authored
fix: support incase of channels attribute is missing in component object (#23)
1 parent 72e873f commit c4b623d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openems/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def get_channel_list(ctx, edge_id, component_id):
7070
edge_config = ctx.obj['client'].get_edge_config(edge_id)
7171

7272
component = [v for (k, v) in edge_config['components'].items() if k == component_id][0]
73-
for channel in component['channels']:
73+
for channel in component.get('channels', []):
7474
click.echo(click.style(f'{component_id}/{channel}', fg='green'))
7575

7676

0 commit comments

Comments
 (0)