Add docstring to help command
This commit is contained in:
parent
dec8172866
commit
3458eb3ef7
|
@ -1,5 +1,6 @@
|
|||
import logging
|
||||
import sys
|
||||
import os
|
||||
|
||||
import openerp
|
||||
from openerp import tools
|
||||
|
@ -25,10 +26,13 @@ class Command(object):
|
|||
pass
|
||||
|
||||
class Help(Command):
|
||||
"""Display the list of available commands"""
|
||||
def run(self, args):
|
||||
print "Available commands:\n"
|
||||
padding = max([len(k) for k in commands.keys()]) + 2
|
||||
for k, v in commands.items():
|
||||
print " %s" % k
|
||||
print " %s%s" % (k.ljust(padding, ' '), v.__doc__ or '')
|
||||
print "\nUse '%s <command> --help' for individual command help." % sys.argv[0].split(os.path.sep)[-1]
|
||||
|
||||
import server
|
||||
import deploy
|
||||
|
|
|
@ -169,6 +169,7 @@ def main(args):
|
|||
sys.exit(rc)
|
||||
|
||||
class Server(Command):
|
||||
"""Start the odoo server (default command)"""
|
||||
def run(self, args):
|
||||
main(args)
|
||||
|
||||
|
|
Loading…
Reference in New Issue