Пример #1
0
                      default=[])

    # Add utility extra_utilities option
    parser.add_option("--hide-utils",
                      action="store_true",
                      dest="hide_util",
                      help="when this option is given, the default utilities "
                      "will not be available, must be used only along "
                      "of --add-utility option",
                      default=False)

    # Add verbosity mode
    add_verbosity(parser, True)

    # Now we process the rest of the arguments.
    opt, args = parser.parse_args()

    # Check security settings
    check_password_security(opt, args)

    # Warn if quiet and verbosity are both specified
    check_verbosity(opt)

    if opt.verbosity is None:
        verbosity = 0
    else:
        verbosity = opt.verbosity

    quiet = opt.quiet
    if opt.quiet is None:
        quiet = False
Пример #2
0
                           "inside the folder given by the utildir option",
                      default=[])

    # Add utility extra_utilities option
    parser.add_option("--hide-utils", action="store_true",
                      dest="hide_util",
                      help="when this option is given, the default utilities "
                           "will not be available, must be used only along "
                           "of --add-utility option",
                      default=False)

    # Add verbosity mode
    add_verbosity(parser, True)

    # Now we process the rest of the arguments.
    opt, args = parser.parse_args()

    # Check security settings
    check_password_security(opt, args)

    # Warn if quiet and verbosity are both specified
    check_verbosity(opt)

    if opt.verbosity is None:
        verbosity = 0
    else:
        verbosity = opt.verbosity

    quiet = opt.quiet
    if opt.quiet is None:
        quiet = False