Fix python style, so that avoid any possible
problems with codepath.
Signed-off-by: Anton Arapov <[email protected]>
---
huge_page_setup_helper.py | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/huge_page_setup_helper.py b/huge_page_setup_helper.py
index cdf3121..737b3d9 100755
--- a/huge_page_setup_helper.py
+++ b/huge_page_setup_helper.py
@@ -95,13 +95,13 @@ while not userIn:
try:
userIn = raw_input("How much memory would you like to allocate for
huge pages? "
"(input in MB, unless postfixed with GB): ")
- if userIn[-2:] == "GB":
+ if userIn[-2:] == "GB":
userHugePageReqMB = int(userIn[0:-2]) * 1024
- elif userIn[-1:] == "G":
+ elif userIn[-1:] == "G":
userHugePageReqMB = int(userIn[0:-1]) * 1024
- elif userIn[-2:] == "MB":
+ elif userIn[-2:] == "MB":
userHugePageReqMB = int(userIn[0:-2])
- elif userIn[-1:] == "M":
+ elif userIn[-1:] == "M":
userHugePageReqMB = int(userIn[0:-1])
else:
userHugePageReqMB = int(userIn)
@@ -159,7 +159,7 @@ if userGIDReq > -1:
print "Group %s (gid %d) already exists, we'll use it" % (userGroupReq,
userGIDReq)
else:
if debug == False:
- os.popen("/usr/sbin/groupadd %s" % userGroupReq)
+ os.popen("/usr/sbin/groupadd %s" % userGroupReq)
else:
print "/usr/sbin/groupadd %s" % userGroupReq
groupNames = os.popen("/usr/bin/getent group %s" %
userGroupReq).readlines()
@@ -326,4 +326,3 @@ print " * Remaining System Memory..: %6d MB" % (memTotal -
userHugePageReqMB)
print " * Huge Page User Group.....: %s (%d)" % (userGroupReq, userGIDReq)
print
-
--
1.7.1
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel