---
 yum/update_md.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/yum/update_md.py b/yum/update_md.py
index 2cb1acb..7da6a08 100644
--- a/yum/update_md.py
+++ b/yum/update_md.py
@@ -79,8 +79,14 @@ class UpdateNotice(object):
 
     def __getitem__(self, item):
         """ Allows scriptable metadata access (ie: un['update_id']). """
+        if type(item) is int:
+            return sorted(self._md)[item]
         return self._md.get(item) or None
 
+    def __contains__(self, item):
+        """ Allows quick tests for foo in blah. """
+        return item in self._md
+
     def __setitem__(self, item, val):
         self._md[item] = val
 
-- 
1.7.6.5

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to