summaryrefslogtreecommitdiffstats
path: root/ipa-admintools/ipa-addgroup
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@notas.(none)>2008-07-21 12:25:37 +0200
committerRob Crittenden <rcrit@ipa.greyoak.com>2008-07-23 10:05:06 -0400
commitf7ca405716b1ee8b92a940e07cd611f6b025795d (patch)
tree5246bd49daa8b72fe39f55d90b4280a8ec1d8b3e /ipa-admintools/ipa-addgroup
parent72a3114a01d0c67cf3b8faf7b28da93e8a6f2de3 (diff)
downloadfreeipa.git-f7ca405716b1ee8b92a940e07cd611f6b025795d.tar.gz
freeipa.git-f7ca405716b1ee8b92a940e07cd611f6b025795d.tar.xz
freeipa.git-f7ca405716b1ee8b92a940e07cd611f6b025795d.zip
Wrap up the raw_input() to user_input() for convenience and uniformity.
Diffstat (limited to 'ipa-admintools/ipa-addgroup')
-rw-r--r--ipa-admintools/ipa-addgroup17
1 files changed, 2 insertions, 15 deletions
diff --git a/ipa-admintools/ipa-addgroup b/ipa-admintools/ipa-addgroup
index caf4e93d..cc813836 100644
--- a/ipa-admintools/ipa-addgroup
+++ b/ipa-admintools/ipa-addgroup
@@ -81,29 +81,16 @@ def main():
if options.usage:
usage()
- cont = False
-
if (len(args) != 2):
- while (cont != True):
- cn = raw_input("Group name: ")
- if (ipavalidate.String(cn, notEmpty=True)):
- print "Please enter a value"
- else:
- cont = True
+ cn = ipautil.user_input("Group name", allow_empty = False)
else:
cn = args[1]
if (ipavalidate.String(cn, notEmpty=True)):
print "Please enter a value"
return 1
- cont = False
if not options.desc:
- while (cont != True):
- desc = raw_input("Description: ")
- if (ipavalidate.String(desc, notEmpty=True)):
- print "Please enter a value"
- else:
- cont = True
+ desc = ipautil.user_input("Description", allow_empty = False)
else:
desc = options.desc
if (ipavalidate.String(desc, notEmpty=True)):