changeset 233:f1c4825fef1c

Consistency in admin command line tool help strings.
author Daniele Nicolodi <daniele@grinta.net>
date Thu, 01 Dec 2011 16:43:30 +0100
parents 4b5f83e5a2fb
children 48adc0d70d22
files src/ltpdarepo/admin.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/ltpdarepo/admin.py	Wed Nov 30 10:18:07 2011 +0100
+++ b/src/ltpdarepo/admin.py	Thu Dec 01 16:43:30 2011 +0100
@@ -174,7 +174,7 @@
                 print '%12s: %s' % (name, getattr(user, name))
 
     cmd = commands.add(user)
-    cmd.add_argument('username')
+    cmd.add_argument('username', metavar='USERNAME')
 
 
     def useradd(self, username, **kwargs):
@@ -221,7 +221,7 @@
             user.save()
 
     cmd = commands.add(usermod)
-    cmd.add_argument('username', metavar='username')
+    cmd.add_argument('username', metavar='USERNAME')
     cmd.add_argument('-a', '--admin', default=argparse.SUPPRESS, type=_bool)
     cmd.add_argument('-n', '--name', default=argparse.SUPPRESS)
     cmd.add_argument('-s', '--surname', default=argparse.SUPPRESS)
@@ -264,8 +264,8 @@
         return self.grant(username, database, **privs)
 
     cmd = commands.add(_grant, name='grant')
-    cmd.add_argument('username')
-    cmd.add_argument('database')
+    cmd.add_argument('username', metavar='USERNAME')
+    cmd.add_argument('database', metavar='PASSWORD')
     cmd.add_argument('privs', metavar='PRIV', nargs='+', type=upper,
                      choices=frozenset(['SELECT', 'INSERT', 'UPDATE', 'DELETE']))
 
@@ -319,7 +319,7 @@
             db.create()
 
     cmd = commands.add(createdb)
-    cmd.add_argument('database', help='database name')
+    cmd.add_argument('database', metavar='DATABASE', help='database name')
     cmd.add_argument('-n', '--name', default='')
     cmd.add_argument('-d', '--description', default='')
 
@@ -334,7 +334,7 @@
             db.drop()
 
     cmd = commands.add(dropdb)
-    cmd.add_argument('database', help='database name')
+    cmd.add_argument('database', metavar='DATABASE', help='database name')
 
 
     # install