duplicity.cli_main module

Main for parse command line, check for consistency, and set config

class duplicity.cli_main.DuplicityHelpFormatter(prog, indent_increment=2, max_help_position=24, width=None)[source]

Bases: ArgumentDefaultsHelpFormatter, RawDescriptionHelpFormatter

A working class to combine ArgumentDefaults, RawDescription. Use with make_wide() to insure we catch argparse API changes.

duplicity.cli_main.harvest_namespace(args)[source]

Copy all arguments and their values to the config module. Don’t copy attributes that are ‘hidden’ (start with an underscore) or whose name is the empty string (used for arguments that don’t directly store a value by using dest=””)

duplicity.cli_main.make_wide(formatter, w=120, h=46)[source]

Return a wider HelpFormatter, if possible. See: https://stackoverflow.com/a/5464440 Beware: “Only the name of this class is considered a public API.”

duplicity.cli_main.new_parser(**kwargs)[source]

Return properly defined overrideable parser

duplicity.cli_main.parse_cmdline_options(arglist)[source]

Parse remaining argument list once all is defined.

duplicity.cli_main.parse_log_options(arglist)[source]

Parse the commands and options that need to be handled first. Mainly to make sure logging goes to the right place with correct verbosity. Everything else is passed on to the main parsers.

duplicity.cli_main.process_command_line(cmdline_list)[source]

Process command line, set config