[yum-cvs] /yum/yum plugins.py,1.33,1.34

Tim Lauridsen timlau at linux.duke.edu
Mon Oct 2 16:34:35 UTC 2006


Update of /home/groups/yum/cvs//yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv26826/yum

Modified Files:
	plugins.py 
Log Message:
replaced IncludingConfigParser with ConfigPreProcessor/ConfigParser in plugins, so i works like the rest of yum.

Index: plugins.py
===================================================================
RCS file: /home/groups/yum/cvs//yum/yum/plugins.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- plugins.py	2 Oct 2006 08:42:18 -0000	1.33
+++ plugins.py	2 Oct 2006 16:34:32 -0000	1.34
@@ -24,7 +24,8 @@
 import ConfigParser
 import config 
 import Errors
-from parser import IncludingConfigParser
+from parser import ConfigPreProcessor
+
 
 # TODO: expose rpm package sack objects to plugins (once finished)
 # TODO: allow plugins to use the existing config stuff to define options for
@@ -246,18 +247,13 @@
             self.verbose_logger.log(logginglevels.INFO_2, "Unable to find configuration file for plugin %s"
                 % modname)
             return None
-
-
+        parser = ConfigParser.ConfigParser()
+        confpp_obj = ConfigPreProcessor(conffilename)
         try:
-            parser = IncludingConfigParser()
-            parser.read(conffilename)
-        except ConfigParser.Error, e:
+            parser.readfp(confpp_obj)
+        except ParsingError, e:
             raise Errors.ConfigError("Couldn't parse %s: %s" % (conffilename,
                 str(e)))
-        except IOError, e:
-            self.verbose_logger.log(logginglevels.INFO_2, str(e))
-            return None
-
         return parser
 
     def setCmdLine(self, opts, commands):




More information about the Yum-cvs-commits mailing list