[Yum-devel] [Fwd: [yum-cvs] yum/yum config.py,1.81,1.82]
Menno Smits
menno-yum at freshfoo.com
Fri Dec 9 03:26:36 UTC 2005
Hmmmm, I really wanted the getConfigOption and setConfigOption methods
to go away. They are kinda ugly.
What needs these? I thought I got rid of all uses of these methods
within Yum so I assume some external program that uses the Yum API is
needs them.
Menno
-------- Original Message --------
Subject: [yum-cvs] yum/yum config.py,1.81,1.82
Date: Thu, 8 Dec 2005 18:19:43 -0500 (EST)
From: katzj at login.linux.duke.edu (Jeremy Katz)
Reply-To: yum-devel at lists.dulug.duke.edu
To: yum-cvs-commits at lists.dulug.duke.edu
Update of /home/groups/yum/cvs/yum/yum
In directory login:/tmp/cvs-serv17679/yum
Modified Files:
config.py
Log Message:
fix for gratutious config API breakage
Index: config.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/config.py,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- config.py 3 Dec 2005 07:15:10 -0000 1.81
+++ config.py 8 Dec 2005 23:19:41 -0000 1.82
@@ -356,6 +356,11 @@
for name in self.iterkeys():
yield (name, getattr(self, name))
+ def getConfigOption(self, option, default=None):
+ if hasattr(self, option):
+ return getattr(self, option)
+ return default
+
class EarlyConf(BaseConfig):
distroverpkg = Option('fedora-release')
@@ -519,7 +524,6 @@
return default
return option.parse(val)
-
def _getEnvVar():
'''Return variable replacements from the environment variables
YUM0 to YUM9
_______________________________________________
https://lists.dulug.duke.edu/mailman/listinfo/yum-cvs-commits
Scanned by the NetBox from NetBox Blue
(http://netboxblue.com/)
More information about the Yum-devel
mailing list