aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Arapov <aarapov@redhat.com>2010-10-20 13:17:48 +0200
committerEric B Munson <emunson@mgebm.net>2010-10-20 10:49:51 -0500
commitd871b423f989ab89109369622eae7db3c120181c (patch)
tree98a59a92424fe45da679536ecb9519725945f72e
parent78713ddcafb8498074be5f4f31ac424c296a7bbd (diff)
downloadlibhugetlbfs-d871b423f989ab89109369622eae7db3c120181c.tar.gz
setup_helper: don't crash when empty group name is provided.
Don't crash with the empty group name provided, rather suggest "hugepages" one and use it by the default. Reported-by: CAI Qian <caiqian@redhat.com> Signed-off-by: Anton Arapov <anton@redhat.com> Signed-off-by: Eric B Munson <emunson@mgebm.net>
-rwxr-xr-xhuge_page_setup_helper.py6
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!"