[Yum-devel] [PATCH] Show a nice error message when a user tries to access history
seth vidal
skvidal at fedoraproject.org
Thu Jun 24 05:23:23 UTC 2010
On Thu, 2010-06-24 at 00:44 -0400, James Antill wrote:
> ---
> yumcommands.py | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/yumcommands.py b/yumcommands.py
> index dcf72db..6b134a4 100644
> --- a/yumcommands.py
> +++ b/yumcommands.py
> @@ -1331,6 +1331,9 @@ class HistoryCommand(YumCommand):
> if extcmds and extcmds[0] in ('repeat', 'redo', 'undo', 'new'):
> checkRootUID(base)
> checkGPGKey(base)
> + elif not os.access(base.history._db_file, os.R_OK):
> + base.logger.critical(_("You don't have access to the history DB."))
> + raise cli.CliError
>
> def doCommand(self, base, basecmd, extcmds):
> vcmd = 'list'
ACK
-sv
More information about the Yum-devel
mailing list