[Yum-devel] [PATCH] Make pkgs scriptable: ("%(ui_nevra)s - %(ui_from_repo)s" % pkg). BZ 570615
James Antill
james at and.org
Fri Mar 5 00:12:43 UTC 2010
---
yum/packages.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/yum/packages.py b/yum/packages.py
index c473ece..33cbc39 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -290,6 +290,9 @@ class PackageObject(object):
return True
return False
+ def __getitem__(self, key):
+ return getattr(self, key)
+
def verEQ(self, other):
""" Compare package to another one, only rpm-version equality. """
if not other:
--
1.6.6
More information about the Yum-devel
mailing list