Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Commit

Permalink
add descriptions to commands
Browse files Browse the repository at this point in the history
  • Loading branch information
vangheem committed Dec 28, 2016
1 parent d7f818b commit 96749aa
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plone.server/plone/server/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

class Command(object):

description = ''

def __init__(self):
self.request = FakeRequest()
self.request.security.add(TestParticipation(self.request))
Expand Down Expand Up @@ -42,7 +44,7 @@ def __init__(self):
self.run(arguments, settings, app)

def get_parser(self):
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(description=self.description)
parser.add_argument('-c', '--configuration',
default='config.json', help='Configuration file')
parser.add_argument('--debug', dest='debug', action='store_true',
Expand Down
1 change: 1 addition & 0 deletions src/plone.server/plone/server/commands/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def format_headers(headers):


class CliCommand(Command):
description = 'Plone server CLI utility'

def get_parser(self):
parser = super(CliCommand, self).get_parser()
Expand Down
1 change: 1 addition & 0 deletions src/plone.server/plone/server/commands/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def traverse_to_path(app, path):


class MigrateCommand(Command):
description = 'Plone server migration utility'

def get_parser(self):
parser = super(MigrateCommand, self).get_parser()
Expand Down
1 change: 1 addition & 0 deletions src/plone.server/plone/server/commands/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@


class ServerCommand(Command):
description = 'Plone server runner'

def run(self, arguments, settings, app):
web.run_app(app, port=settings['address'])
1 change: 1 addition & 0 deletions src/plone.server/plone/server/commands/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@


class ShellCommand(Command):
description = 'Plone server shell'

def run(self, arguments, settings, app):
app_settings['root_user']['password'] = TESTING_SETTINGS['root_user']['password']
Expand Down

0 comments on commit 96749aa

Please sign in to comment.