[dpdk-dev] [PATCH] usertools: show valid hugepage sizes if user requests an invalid hugepage size

Stephen Hemminger stephen at networkplumber.org
Mon Nov 30 17:47:53 CET 2020


On Mon, 30 Nov 2020 17:47:19 +0500
Sarosh Arif <sarosh.arif at emumba.com> wrote:

> -        sys.exit('{} is not a valid system huge page size'.format(size))
> -
> +        print('{} is not a valid system huge page size'.format(size))
> +        show_valid_page_sizes(path)
> +        sys.exit()

This is not the same. You should change the helper function to return
a string and do:

	sys.exit('Invalid page size. Valid sizes are:', valid_page_sizes())



More information about the dev mailing list