Skip to content

Commit

Permalink
Add ui_id to yum info and a stub. to FakeRepo().
Browse files Browse the repository at this point in the history
  • Loading branch information
james-antill committed Sep 7, 2012
1 parent 2a409da commit 2870ccc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion output.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ def infoOutput(self, pkg, highlight=False):
print _("Version : %s") % to_unicode(pkg.version)
print _("Release : %s") % to_unicode(pkg.release)
print _("Size : %s") % self.format_number(float(pkg.size))
print _("Repo : %s") % to_unicode(pkg.repoid)
print _("Repo : %s") % to_unicode(pkg.repo.ui_id)
if pkg.repoid == 'installed' and 'from_repo' in pkg.yumdb_info:
print _("From repo : %s") % to_unicode(pkg.yumdb_info.from_repo)
if self.verbose_logger.isEnabledFor(logginglevels.DEBUG_3):
Expand Down
4 changes: 4 additions & 0 deletions yum/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ def __hash__(self):
def __str__(self):
return self.id

def _ui_id(self):
return self.id
ui_id = property(fget=lambda self: self._ui_id())


# Goal for the below is to have a packageobject that can be used by generic
# functions independent of the type of package - ie: installed or available
Expand Down

0 comments on commit 2870ccc

Please sign in to comment.