[yum-commits] 2 commits - output.py yum/igroups.py

James Antill james at osuosl.org
Wed May 8 14:43:14 UTC 2013


 output.py      |    4 ++--
 yum/igroups.py |   11 +++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 88e8d8b8677e18390888968525c62ffbd71fa9e7
Author: James Antill <james at and.org>
Date:   Wed May 8 10:42:58 2013 -0400

    Compat. code so we can treat groups/igroups the same. BZ 955236

diff --git a/yum/igroups.py b/yum/igroups.py
index 467aa7b..17f1b56 100644
--- a/yum/igroups.py
+++ b/yum/igroups.py
@@ -40,6 +40,12 @@ class InstalledGroup(object):
         pkg_names = set(pkg_names)
         return sorted(pkg_names.difference(self.pkg_names))
 
+    groupid = property(fget=lambda self: self.gid,
+                      fset=lambda self, value: setattr(self, "gid", value),
+                      fdel=lambda self: setattr(self, "gid", None),
+                      doc="Compat. to treat comps groups/igroups the same")
+
+
 
 class InstalledEnvironment(object):
     def __init__(self, evgid):
@@ -59,6 +65,11 @@ class InstalledEnvironment(object):
         grp_names = set(grp_names)
         return sorted(grp_names.difference(self.grp_names))
 
+    environmentid = property(fget=lambda self: self.evgid,
+                      fset=lambda self, value: setattr(self, "evgid", value),
+                      fdel=lambda self: setattr(self, "evgid", None),
+                      doc="Compat. to treat comps groups/igroups the same")
+
 
 class InstalledGroups(object):
     def __init__(self, db_path):
commit 9303521af6f63917e71576537decc63b0b26a02b
Author: James Antill <james at and.org>
Date:   Mon May 6 14:58:42 2013 -0400

    Don't highlight the empty space, Eg. --showdups list.

diff --git a/output.py b/output.py
index e17194c..6b9e9e2 100755
--- a/output.py
+++ b/output.py
@@ -689,9 +689,9 @@ class YumOutput:
                 # we can.
                 msg += u"%s%s%s%s "
                 if (align == u'-'):
-                    data.extend([hibeg, val, " " * (width - val_width), hiend])
+                    data.extend([hibeg, val, hiend, " " * (width - val_width)])
                 else:
-                    data.extend([hibeg, " " * (width - val_width), val, hiend])
+                    data.extend([" " * (width - val_width), hibeg, val, hiend])
             else:
                 msg += u"%s%s%s\n" + " " * (total_width + width + 1)
                 data.extend([hibeg, val, hiend])


More information about the Yum-commits mailing list