Exemple #1
0
def _promote_args(argument_table, **kwargs):
    argument_table['message'].required = False
    argument_table['destination'].required = False
    utils.rename_argument(argument_table, 'source',
                          new_name='from')
    argument_table['to'] = AddressesArgument(
        'to', 'ToAddresses', help_text=TO_HELP)
    argument_table['cc'] = AddressesArgument(
        'cc', 'CcAddresses', help_text=CC_HELP)
    argument_table['bcc'] = AddressesArgument(
        'bcc', 'BccAddresses', help_text=BCC_HELP)
    argument_table['subject'] = BodyArgument(
        'subject', 'Subject', help_text=SUBJECT_HELP)
    argument_table['text'] = BodyArgument(
        'text', 'Text', help_text=TEXT_HELP)
    argument_table['html'] = BodyArgument(
        'html', 'Html', help_text=HTML_HELP)
Exemple #2
0
def _promote_args(argument_table, **kwargs):
    argument_table['message'].required = False
    argument_table['destination'].required = False
    utils.rename_argument(argument_table, 'source', new_name='from')
    argument_table['to'] = AddressesArgument('to',
                                             'ToAddresses',
                                             help_text=TO_HELP)
    argument_table['cc'] = AddressesArgument('cc',
                                             'CcAddresses',
                                             help_text=CC_HELP)
    argument_table['bcc'] = AddressesArgument('bcc',
                                              'BccAddresses',
                                              help_text=BCC_HELP)
    argument_table['subject'] = BodyArgument('subject',
                                             'Subject',
                                             help_text=SUBJECT_HELP)
    argument_table['text'] = BodyArgument('text', 'Text', help_text=TEXT_HELP)
    argument_table['html'] = BodyArgument('html', 'Html', help_text=HTML_HELP)
 def _rename_arg(argument_table, **kwargs):
     if original_arg_name in argument_table:
         utils.rename_argument(argument_table, original_arg_name, new_name)
Exemple #4
0
 def _rename_arg(argument_table, **kwargs):
     if original_arg_name in argument_table:
         utils.rename_argument(argument_table, original_arg_name, new_name)
Exemple #5
0
def _rename_remove_option(argument_table, **kwargs):
    utils.rename_argument(argument_table, 'options-to-remove',
                          new_name='options')
    del argument_table['options-to-include']