[Yum-devel] [PATCH] Show a nice error message when a user tries to access history
James Antill
james at and.org
Thu Jun 24 04:44:23 UTC 2010
---
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'
--
1.7.0.1
More information about the Yum-devel
mailing list