[yum-commits] Branch 'yum-3_2_X' - cli.py yum/plugins.py

Tim Lauridsen timlau at osuosl.org
Tue Mar 31 15:12:38 UTC 2009


 cli.py         |    3 +++
 yum/plugins.py |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 501f0c7b1925d2c96ce863da5600d76e14e77881
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date:   Tue Mar 31 17:12:17 2009 +0200

    group commandline options added by plugins

diff --git a/cli.py b/cli.py
index 4410fba..34c6651 100644
--- a/cli.py
+++ b/cli.py
@@ -1089,6 +1089,9 @@ class YumOptionParser(OptionParser):
         OptionParser.__init__(self, **kwargs)
         self.logger = logging.getLogger("yum.cli")
         self.base = base
+        self.plugin_option_group = OptionGroup(self, _("Plugin Options"))
+        self.add_option_group(self.plugin_option_group)
+
         self._addYumBasicOptions()
 
     def error(self, msg):
diff --git a/yum/plugins.py b/yum/plugins.py
index 8b3c95a..bac737f 100644
--- a/yum/plugins.py
+++ b/yum/plugins.py
@@ -410,7 +410,7 @@ class PluginConduit:
         @return: the global optparse.OptionParser instance used by Yum. May be
             None if an OptionParser isn't in use.
         '''
-        return self._parent.optparser
+        return self._parent.optparser.plugin_option_group
 
     def confString(self, section, opt, default=None):
         '''Read a string value from the plugin's own configuration file


More information about the Yum-commits mailing list