Various utility functions, and a utility class.
Change settings so that nothing will be printed to the terminal after an uncaught exceptions.KeyboardInterrupt.
Convert a number of jiffies to seconds, using the convention that 100 jiffies = 1 second.
Parameters: | jiffies – a number of jiffies |
---|---|
Returns: | the equivalent number of seconds |
Return a human-readable string representation of the length of a time interval given in seconds.
Parameters: | seconds – the length of the time interval in seconds |
---|---|
Returns: | a human-readable string representation of the length of |
the time interval
Return information about a process taken from /proc/pid/status, /proc/stat/, and /proc/pid/stat.
Parameters: | pid – the process id number |
---|---|
Returns: | a dictionary containing information about the process |
Output information about another process that is holding the yum lock.
Parameters: |
|
---|---|
Returns: | a dictionary containing information about the process. This is the same as the dictionary returned by get_process_info(). |
Bases: cli.YumBaseCli
A class to extend the yum cli for utilities.
Build the transaction.
Parameters: | unfinished_transactions_check – whether to check if an unfinished transaction has been saved |
---|
Parse command line options, and perform configuration.
Parameters: |
|
---|---|
Returns: | a dictionary containing the values of command line options |
Perform the transaction.
Do a default setup for all the normal or necessary yum components; this method is mostly just a used for testing.
Output a message stating that a fatal error has occurred.
Parameters: | e – the exception |
---|---|
Returns: | the exit code |
Output a message stating that the program is exiting due to an IO exception.
Parameters: | e – the IO exception |
---|---|
Returns: | the exit code |
Parameters: | e – the exception |
---|---|
Returns: | the exit code |
Output a message stating that the operation was cancelled by the user.
Returns: | the exit code |
---|
Return an option group to add non inherited options.
Returns: | a optparse.OptionGroup for adding options that are not inherited from YumBaseCli. |
---|
Return the cli.YumOptionParser for this object.
Returns: | the cli.YumOptionParser for this object |
---|
Release the yum lock.
Returns: | the exit code |
---|
Establish the yum lock. If another process is already holding the yum lock, by default this method will keep trying to establish the lock until it is successful. However, if self.conf.exit_on_lock is set to True, it will raise a Errors.YumBaseError.