Don't crash with the empty group name provided, rather suggest "hugepages" one and use it by the default.
Reported-by: CAI Qian <[email protected]> Signed-off-by: Anton Arapov <[email protected]> --- huge_page_setup_helper.py | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/huge_page_setup_helper.py b/huge_page_setup_helper.py index 32fbe19..8bfef14 100755 --- a/huge_page_setup_helper.py +++ b/huge_page_setup_helper.py @@ -134,8 +134,10 @@ inputIsValid = False # ask for the name of the group allowed access to huge pages while inputIsValid == False: foundbad = False - userGroupReq = raw_input("What group should have access to the huge pages? " - "(The group will be created, if need be): ") + userGroupReq = raw_input("What group should have access to the huge pages?" + "(The group will be created, if need be) [hugepages]: ") + if userGroupReq is '': + userGroupReq = 'hugepages' if userGroupReq[0].isdigit() or userGroupReq[0] == "-": foundbad = True print "Group names cannot start with a number or dash, please try again!" -- 1.7.2.3 ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Libhugetlbfs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel
