From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5E135A04DB; Mon, 30 Nov 2020 17:48:05 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 03A14C910; Mon, 30 Nov 2020 17:48:03 +0100 (CET) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by dpdk.org (Postfix) with ESMTP id ED27F4C93 for ; Mon, 30 Nov 2020 17:48:00 +0100 (CET) Received: by mail-pf1-f173.google.com with SMTP id w202so10750423pff.10 for ; Mon, 30 Nov 2020 08:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uGeZKpLHVcxcIWHkSuaskGmAe8Caq91emGzj4Jv5oZg=; b=U9Bjs3Oe7nyZrKTKTPEivatEUH82r5Y9yN4BT4CobXDnpuYTTrnxjv1kkXLPGb+7C9 qNRlmnAGvPiWtOJOtIGqLXUZzw6M6A4jlRjeH+xJ409LAz7vlKBkUkXKKRATSLiVAYpU xsSO5KdumJoImK0ZtdNfk3GUVqVltoSTEW76gAdmKmT/6HaliuVk0iTc1XkgKfbK/wrg xOD494xywkBsfNhNKmhgIbpGFXavkyFbdveeZtL1Zxag9rucKyqmANgJ9WFOEqJTWrFe bDF6HWWIoVKLTnAxyg4kah+/sreD8aSXw9ny9YlxxzGk+9E1s+YYk+fWijMH8nCU7SBk u1dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uGeZKpLHVcxcIWHkSuaskGmAe8Caq91emGzj4Jv5oZg=; b=iuYj2p1zGilmHOf83qgv43kJU91fRDC+daQ2LmwdNPpdTXewdQBqm3ip2wHbForQ0D ps3RObAOu1II6/S5l5LG3mbPBaZRHtkQM20B96tW4ZdtadIAq0qUFma4xMF6Q6tmcGM5 zwoHBWEKZKbYpKMQ6vLGwO7XR70wJ/jqRYoFCDA0YwYyy8S4dzItgf1+4ksd0Q5BABM7 k1CnFYjk1EzmRRjufQ9UOCA0frbUfhcE5LeBu1M4HWgnwOhwlTNwrhSoSG5RxZmmuvcl x10yBaXYehnGPQ9AVwEm+VNPInuafC0VvgjhLX8lKKX5+3Cr0cUsIF/Zk6KfGWdD7XwQ tlPQ== X-Gm-Message-State: AOAM5309OXKxAfL8X44WnxL1T3CXlzQZJpAxitOLtjap5O56FO/dHUn+ IQFbmvterardILVCUF2Xm0wCrw== X-Google-Smtp-Source: ABdhPJzA3FD/T2da64wu7hrRl7o9IlC/oJ8j0Q92rz/08n7/Cs7jNZmdCn9fgRkz0NuMeILCbxMdBg== X-Received: by 2002:a63:5963:: with SMTP id j35mr18576654pgm.55.1606754878418; Mon, 30 Nov 2020 08:47:58 -0800 (PST) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id a16sm17871225pfl.125.2020.11.30.08.47.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 08:47:58 -0800 (PST) Date: Mon, 30 Nov 2020 08:47:53 -0800 From: Stephen Hemminger To: Sarosh Arif Cc: sthemmin@microsoft.com, dev@dpdk.org Message-ID: <20201130084753.1b224419@hermes.local> In-Reply-To: <20201130124719.23434-1-sarosh.arif@emumba.com> References: <20201130124719.23434-1-sarosh.arif@emumba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] usertools: show valid hugepage sizes if user requests an invalid hugepage size X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 30 Nov 2020 17:47:19 +0500 Sarosh Arif 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())