Package yum :: Module plugins :: Class PluginConduit
[hide private]
[frames] | no frames]

Class PluginConduit

source code


Instance Methods [hide private]
 
__init__(self, parent, base, conf) source code
 
info(self, level, msg) source code
 
error(self, level, msg) source code
 
promptYN(self, msg) source code
 
getYumVersion(self) source code
 
getOptParser(self)
Return the optparse.OptionParser instance for this execution of Yum
source code
 
confString(self, section, opt, default=None)
Read a string value from the plugin's own configuration file
source code
 
confInt(self, section, opt, default=None)
Read an integer value from the plugin's own configuration file
source code
 
confFloat(self, section, opt, default=None)
Read a float value from the plugin's own configuration file
source code
 
confBool(self, section, opt, default=None)
Read a boolean value from the plugin's own configuration file
source code
 
registerPackageName(self, name) source code
Method Details [hide private]

getOptParser(self)

source code 

Return the optparse.OptionParser instance for this execution of Yum

In the "config" and "init" slots a plugin may add extra options to this instance to extend the command line options that Yum exposes.

In all other slots a plugin may only read the OptionParser instance. Any modification of the instance at this point will have no effect.

See the getCmdLine() method for details on how to retrieve the parsed values of command line options.

Returns:
the global optparse.OptionParser instance used by Yum. May be None if an OptionParser isn't in use.

confString(self, section, opt, default=None)

source code 

Read a string value from the plugin's own configuration file

Parameters:
  • section - Configuration file section to read.
  • opt - Option name to read.
  • default - Value to read if option is missing.
Returns:
String option value read, or default if option was missing.

confInt(self, section, opt, default=None)

source code 

Read an integer value from the plugin's own configuration file

Parameters:
  • section - Configuration file section to read.
  • opt - Option name to read.
  • default - Value to read if option is missing.
Returns:
Integer option value read, or default if option was missing or could not be parsed.

confFloat(self, section, opt, default=None)

source code 

Read a float value from the plugin's own configuration file

Parameters:
  • section - Configuration file section to read.
  • opt - Option name to read.
  • default - Value to read if option is missing.
Returns:
Float option value read, or default if option was missing or could not be parsed.

confBool(self, section, opt, default=None)

source code 

Read a boolean value from the plugin's own configuration file

Parameters:
  • section - Configuration file section to read.
  • opt - Option name to read.
  • default - Value to read if option is missing.
Returns:
Boolean option value read, or default if option was missing or could not be parsed.