[yum-commits] 2 commits - yum/update_md.py
James Antill
james at osuosl.org
Tue Dec 11 17:30:30 UTC 2012
yum/update_md.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit eda6aa843afd596d08eb9101a169732709cfb097
Author: James Antill <james at and.org>
Date: Tue Dec 11 12:28:39 2012 -0500
Return [] and False instead of None with scriptable access.
diff --git a/yum/update_md.py b/yum/update_md.py
index 85e9cec..4fe802b 100644
--- a/yum/update_md.py
+++ b/yum/update_md.py
@@ -81,7 +81,10 @@ class UpdateNotice(object):
""" 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
+ ret = self._md.get(item)
+ if ret == '':
+ ret = None
+ return ret
def __contains__(self, item):
""" Allows quick tests for foo in blah. """
commit 0fbd2314b854fbe97eb18e7829da33d1950e70a5
Author: James Antill <james at and.org>
Date: Tue Dec 11 12:15:59 2012 -0500
Add obvious __ne__ to call __eq__ for updateinfo. BZ 737173.
diff --git a/yum/update_md.py b/yum/update_md.py
index 0586c1c..85e9cec 100644
--- a/yum/update_md.py
+++ b/yum/update_md.py
@@ -104,6 +104,9 @@ class UpdateNotice(object):
return False
return True
+ def __ne__(self, other):
+ return not (self == other)
+
def text(self, skip_data=('files', 'summary', 'rights', 'solution')):
head = """
===============================================================================
More information about the Yum-commits
mailing list