Skip to content

Commit

Permalink
Fix host group type error on >= 6.2 (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
pederhan authored Nov 27, 2023
1 parent a61ad6e commit 3870fc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zabbix_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def do_show_hostgroup(self, args):
result_columns[result_columns_key] = {'groupid': group['groupid'],
'name': group['name'],
'flags': zabbix_cli.utils.get_hostgroup_flag(int(group['flags'])),
'type': zabbix_cli.utils.get_hostgroup_type(int(group['internal'])),
'type': zabbix_cli.utils.get_hostgroup_type(int(group.get('internal', 0))),
'hosts': group['hosts']}
else:
host_list = []
Expand All @@ -647,7 +647,7 @@ def do_show_hostgroup(self, args):
result_columns[result_columns_key] = {'1': group['groupid'],
'2': group['name'],
'3': zabbix_cli.utils.get_hostgroup_flag(int(group['flags'])),
'4': zabbix_cli.utils.get_hostgroup_type(int(group['internal'])),
'4': zabbix_cli.utils.get_hostgroup_type(int(group.get('internal', 0))),
'5': '\n'.join(textwrap.wrap(', '.join(host_list), 60))}
result_columns_key = result_columns_key + 1

Expand Down

0 comments on commit 3870fc6

Please sign in to comment.