Module cli
[hide private]
[frames] | no frames]

Module cli

source code

Command line interface yum class and related.

Classes [hide private]
  CliError
Command line interface related Exception.
  YumBaseCli
This is the base class for yum cli.
  YumOptionParser
Subclass that makes some minor tweaks to make OptionParser do things the "yum way".
Functions [hide private]
 
sigquit(signum, frame)
SIGQUIT handler for the yum cli.
source code
 
_filtercmdline(novalopts, valopts, args)
Keep only specific options from the command line argument list
source code
Variables [hide private]
  __package__ = None
Function Details [hide private]

_filtercmdline(novalopts, valopts, args)

source code 

Keep only specific options from the command line argument list

This function allows us to peek at specific command line options when using the optparse module. This is useful when some options affect what other options should be available.

Parameters:
  • novalopts - A sequence of options to keep that don't take an argument.
  • valopts - A sequence of options to keep that take a single argument.
  • args - The command line arguments to parse (as per sys.argv[:1]
Returns:
A list of strings containing the filtered version of args.

Will raise ValueError if there was a problem parsing the command line.