Sitelet https://github.com/msGenDev/aws-cli/commit/6d634013354347fe68498592b1e9708d8ee664eb
Skip to content

Commit 6d63401

Browse files
committed
Adapting to simplifications in bcdocs.
1 parent f24770c commit 6d63401

2 files changed

Lines changed: 3 additions & 14 deletions

File tree

‎awscli/help.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,7 @@ def name(self):
169169

170170
def __call__(self, args, parsed_globals):
171171
# Create an event handler for a Provider Document
172-
event_handler = self.EventHandlerClass()
173-
# Initialize the handler, which registers all event handlers
174-
event_handler.initialize(self.session)
172+
event_handler = self.EventHandlerClass(self)
175173
# Now generate all of the events for a Provider document.
176174
# We pass ourselves along so that we can, in turn, get passed
177175
# to all event handlers.

‎examples/new_command.py‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,11 @@ class ConfigDocumentEventHandler(CLIDocumentEventHandler):
2727
interested in and implements the handlers for those events.
2828
"""
2929

30-
def initialize(self, session):
31-
CLIDocumentEventHandler.initialize(self, session)
32-
session.register('doc-title.Config.*', self.title)
33-
session.register('doc-description.Config.*', self.description)
34-
35-
def build_translation_map(self):
36-
for op in self.service.operations:
37-
self.translation_map[op.name] = op.cli_name
38-
39-
def title(self, help_command, **kwargs):
30+
def doc_title(self, help_command, **kwargs):
4031
doc = help_command.doc
4132
doc.style.h1(help_command.name)
4233

43-
def description(self, help_command, **kwargs):
34+
def doc_description(self, help_command, **kwargs):
4435
doc = help_command.doc
4536
config = help_command.obj
4637
doc.style.h2('Description')

0 commit comments

Comments
 (0)