[yum-cvs] 2 commits - yum/update_md.py
James Bowes
jbowes at linux.duke.edu
Fri Nov 30 22:03:55 UTC 2007
yum/update_md.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
New commits:
commit 421cabd485c81895b8b929b9f71fd651e5dc6209
Merge: b39a5a7... fe21bd5...
Author: James Bowes <jbowes at redhat.com>
Date: Fri Nov 30 17:03:35 2007 -0500
Merge branch 'epydoc'
commit fe21bd510a9b35812b09ab9a302e79d6cc528a36
Author: James Bowes <jbowes at redhat.com>
Date: Fri Nov 30 16:43:17 2007 -0500
Docstring additions for yum.update_md
diff --git a/yum/update_md.py b/yum/update_md.py
index 441aa19..05d8197 100644
--- a/yum/update_md.py
+++ b/yum/update_md.py
@@ -17,6 +17,10 @@
# Seth Vidal <skvidal at linux.duke.edu>
# Luke Macken <lmacken at redhat.com>
+"""
+Update metadata (updateinfo.xml) parsing.
+"""
+
import sys
import gzip
import exceptions
@@ -32,10 +36,16 @@ iterparse = cElementTree.iterparse
class UpdateNoticeException(exceptions.Exception):
+ """ An exception thrown for bad UpdateNotice data. """
pass
class UpdateNotice(object):
+
+ """
+ A single update notice (for instance, a security fix).
+ """
+
def __init__(self, elem=None):
self._md = {
'from' : '',
@@ -218,6 +228,11 @@ class UpdateNotice(object):
class UpdateMetadata(object):
+
+ """
+ The root update metadata object.
+ """
+
def __init__(self):
self._notices = {}
self._cache = {} # a pkg name => notice cache for quick lookups
@@ -273,6 +288,7 @@ class UpdateMetadata(object):
def main():
+ """ update_md test function. """
def usage():
print >> sys.stderr, "Usage: %s <update metadata> ..." % sys.argv[0]
sys.exit(1)
More information about the Yum-cvs-commits
mailing list