def take_action(self, parsed_args): res = iter(api.check_dhcp_request( parsed_args.iface, parsed_args.endpoint, parsed_args.range_start, parsed_args.range_end, timeout=parsed_args.timeout)) first = res.next() columns = first.keys() return columns, [first.values()] + [item.values() for item in res]