MCPcopy Create free account
hub / github.com/aws/aws-cli / document_translation

Function document_translation

awscli/customizations/datapipeline/__init__.py:93–116  ·  view source on GitHub ↗
(help_command, **kwargs)

Source from the content-addressed store, hash-verified

91
92
93def document_translation(help_command, **kwargs):
94 # Remove all the writes until we get to the output.
95 # I don't think this is the ideal way to do this, we should
96 # improve our plugin/doc system to make this easier.
97 doc = help_command.doc
98 current = ''
99 while current != '======\nOutput\n======':
100 try:
101 current = doc.pop_write()
102 except IndexError:
103 # This should never happen, but in the rare case that it does
104 # we should be raising something with a helpful error message.
105 raise DocSectionNotFoundError(
106 'Could not find the "output" section for the command: %s'
107 % help_command
108 )
109 doc.write('======\nOutput\n======')
110 doc.write(
111 '\nThe output of this command is the pipeline definition, which'
112 ' is documented in the '
113 '`Pipeline Definition File Syntax '
114 '<http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/'
115 'dp-writing-pipeline-definition.html>`__'
116 )
117
118
119def add_pipeline_definition(argument_table, **kwargs):

Callers

nothing calls this directly

Calls 3

pop_writeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected