Trees | Indices | Help |
|
---|
|
optparse.OptionContainer --+ | optparse.OptionParser --+ | GbpOptionParser
Handles commandline options and parsing of config files
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
str or None
|
|
||
Inherited from Inherited from Inherited from Inherited from |
|
|||
list
>>> conf_backup = os.getenv('GBP_CONF_FILES') >>> if conf_backup is not None: del os.environ['GBP_CONF_FILES'] >>> homedir = os.path.expanduser("~") >>> files = GbpOptionParser.get_config_files() >>> files_mangled = [file.replace(homedir, 'HOME') for file in files] >>> files_mangled ['/etc/git-buildpackage/gbp.conf', 'HOME/.gbp.conf', '%(top_dir)s/.gbp.conf', '%(top_dir)s/debian/gbp.conf', '%(git_dir)s/gbp.conf'] >>> files = GbpOptionParser.get_config_files(no_local=True) >>> files_mangled = [file.replace(homedir, 'HOME') for file in files] >>> files_mangled ['/etc/git-buildpackage/gbp.conf', 'HOME/.gbp.conf'] >>> os.environ['GBP_CONF_FILES'] = 'test1:test2' >>> GbpOptionParser.get_config_files() ['test1', 'test2'] >>> del os.environ['GBP_CONF_FILES'] >>> if conf_backup is not None: os.environ['GBP_CONF_FILES'] = conf_backup |
|
|
|||
dict |
defaults =
defaults value of an option if not in the config file or given on the command line |
||
dict |
help =
help messages |
||
list |
def_config_files =
list of default config files we parse |
||
Inherited from |
|
|||
string |
command the gbp command we store the options for |
||
dict |
config current configuration parameters |
||
string |
prefix prefix to prepend to all commandline options |
|
Get list of config files from the GBP_CONF_FILES environment variable.
|
|
set a option for the command line parser, the default is read from the config file param option_name: name of the option type option_name: string param help: help text type help: string
|
Query a single interpolated config file value.
|
|
defaultsdefaults value of an option if not in the config file or given on the command line
|
helphelp messages
|
def_config_fileslist of default config files we parse
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Dec 31 11:30:00 2016 | http://epydoc.sourceforge.net |