Skip to content

Commit

Permalink
Fix a possible "yum history stats" tb. BZ 1059184
Browse files Browse the repository at this point in the history
  • Loading branch information
Zdenek Pavlas committed Jan 31, 2014
1 parent 1bbf40a commit 9aa35ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions yumcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2976,6 +2976,9 @@ def _hcmd_stats(self, base, extcmds):
print _("Transactions:"), 0
return
counts = base.history._pkg_stats()
if not counts:
msg = _("could not open history file: %s") % base.history._db_file
raise yum.Errors.MiscError, msg
trans_1 = base.history.old("1")[0]
print _("Transactions:"), trans_N.tid
print _("Begin time :"), time.ctime(trans_1.beg_timestamp)
Expand Down

0 comments on commit 9aa35ee

Please sign in to comment.