def main():
    parser = argparse.ArgumentParser(description='')
    parser.add_argument('--exclude-logs', action='store_true', default=False,
                        help='Don\'t include logs in the generated tarball')
    parser.add_argument('--exclude-configs', action='store_true', default=False,
                        help='Don\'t include configs in the generated tarball')
    parser.add_argument('--exclude-content', action='store_true', default=False,
                        help='Don\'t include content packs in the generated tarball')
    parser.add_argument('--exclude-system-info', action='store_true', default=False,
                        help='Don\'t include system information in the generated tarball')
    parser.add_argument('--exclude-shell-commands', action='store_true', default=False,
                        help='Don\'t include shell commands output in the generated tarball')
    parser.add_argument('--yes', action='store_true', default=False,
                        help='Run in non-interactive mode and answer "yes" to all the questions')
    parser.add_argument('--review', action='store_true', default=False,
                        help='Generate the tarball, but don\'t encrypt and upload it')
    parser.add_argument('--debug', action='store_true', default=False,
                        help='Enable debug mode')
    parser.add_argument('--config', action='store', default=None,
                        help='Get required configurations from config file')
    parser.add_argument('--output', action='store', default=None,
                        help='Specify output file path')
    parser.add_argument('--existing-file', action='store', default=None,
                        help='Specify an existing file to operate on')
    args = parser.parse_args()

    setup_logging()

    # Ensure that not all options have been excluded
    abort = True
    for arg_name in ARG_NAMES:
        abort &= getattr(args, arg_name, False)

    if abort:
        print('Generated tarball would be empty. Aborting.')
        sys.exit(2)

    # Get setting overrides from yaml file if specified
    if args.config:
        try:
            with open(args.config, 'r') as yaml_file:
                config_file = yaml.safe_load(yaml_file)
        except Exception as e:
            LOG.error('Failed to parse config file: %s' % e)
            sys.exit(1)

        if not isinstance(config_file, dict):
            LOG.error('Unrecognized config file format')
            sys.exit(1)
    else:
        config_file = {}

    company_name = config_file.get('company_name', COMPANY_NAME)

    # Defaults
    encrypt = True
    upload = True

    if args.review:
        encrypt = False
        upload = False

    if encrypt:
        # When not running in review mode, GPG needs to be installed and
        # available
        if not GPG_INSTALLED:
            msg = ('"gpg" binary not found, can\'t proceed. Make sure "gpg" is installed '
                   'and available in PATH.')
            raise ValueError(msg)

    if not args.yes and not args.existing_file and upload:
        submitted_content = [name.replace('exclude_', '') for name in ARG_NAMES if
                             not getattr(args, name, False)]
        submitted_content = ', '.join(submitted_content)
        print('This will submit the following information to %s: %s' % (company_name,
                                                                        submitted_content))
        value = six.moves.input('Are you sure you want to proceed? [y/n] ')
        if ['y', 'yes'] not in value.strip().lower():
            print('Aborting')
            sys.exit(1)

    # Prompt user for optional additional context info
    user_info = {}
    if not args.yes and not args.existing_file:
        print('If you want us to get back to you via email, you can provide additional context '
              'such as your name, email and an optional comment')
        value = six.moves.input('Would you like to provide additional context? [y/n] ')
        if value.strip().lower() in ['y', 'yes']:
            user_info['name'] = six.moves.input('Name: ')
            user_info['email'] = six.moves.input('Email: ')
            user_info['comment'] = six.moves.input('Comment: ')

    debug_collector = DebugInfoCollector(include_logs=not args.exclude_logs,
                                         include_configs=not args.exclude_configs,
                                         include_content=not args.exclude_content,
                                         include_system_info=not args.exclude_system_info,
                                         include_shell_commands=not args.exclude_shell_commands,
                                         user_info=user_info,
                                         debug=args.debug,
                                         config_file=config_file,
                                         output_path=args.output)

    debug_collector.run(encrypt=encrypt, upload=upload, existing_file=args.existing_file)
dataset/ETHPy150Open StackStorm/st2/st2debug/st2debug/cmd/submit_debug_info.py/main/swapped operands of `not in`