[yum-commits] plugins/aliases
James Antill
james at osuosl.org
Wed Apr 15 14:03:27 UTC 2009
plugins/aliases/aliases.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 8777843757b4d52d8afa690e85d8604e9b7b9202
Author: James Antill <james at and.org>
Date: Wed Apr 15 10:03:11 2009 -0400
Exit nicley when people try to run aliased commands
diff --git a/plugins/aliases/aliases.py b/plugins/aliases/aliases.py
index 7a730e6..721cb79 100644
--- a/plugins/aliases/aliases.py
+++ b/plugins/aliases/aliases.py
@@ -16,7 +16,7 @@
#
# by James Antill
-from yum.plugins import TYPE_INTERACTIVE
+from yum.plugins import TYPE_INTERACTIVE, PluginYumExit
import sys
import time
try: # yumex doesn't like import cli, but runs this
@@ -48,7 +48,12 @@ class AliasedCommand:
def getSummary(self):
return ''
- # doCheck and doCommand are never called, for aliased commands.
+ def doCheck(self, base, basecmd, extcmds):
+ if recursive: # shouldn't happen
+ raise PluginYumExit('And error has occured for %s, please create a bug report')
+
+ raise PluginYumExit('%s is an alias not a command, however recursive processing is turned off')
+ doCommand = doCheck
aliases = None
More information about the Yum-commits
mailing list