Skip to content

Commit

Permalink
Straighten inheritance of *Display classes
Browse files Browse the repository at this point in the history
Closes: #1698
Approved by: lukash
  • Loading branch information
m-blaha authored and rh-atomic-bot committed Dec 3, 2020
1 parent 836d956 commit 6e2ce41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
15 changes: 3 additions & 12 deletions dnf/cli/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from dnf.cli.format import format_number, format_time
from dnf.i18n import _, C_, P_, ucd, fill_exact_width, textwrap_fill, exact_width, select_short_long
from dnf.pycomp import xrange, basestring, long, unicode, sys_maxsize
from dnf.yum.rpmtrans import LoggingTransactionDisplay
from dnf.yum.rpmtrans import TransactionDisplay
from dnf.db.history import MergedTransactionWrapper
import dnf.base
import dnf.callback
Expand Down Expand Up @@ -2071,7 +2071,7 @@ def short_id(id):
return self.output.userconfirm()


class CliTransactionDisplay(LoggingTransactionDisplay):
class CliTransactionDisplay(TransactionDisplay):
"""A YUM specific callback class for RPM operations."""

width = property(lambda self: dnf.cli.term._term_width())
Expand All @@ -2093,7 +2093,7 @@ def progress(self, package, action, ti_done, ti_total, ts_done, ts_total):
:param package: the package involved in the event
:param action: the type of action that is taking place. Valid
values are given by
:func:`rpmtrans.LoggingTransactionDisplay.action.keys()`
:func:`rpmtrans.TransactionDisplay.action.keys()`
:param ti_done: a number representing the amount of work
already done in the current transaction
:param ti_total: a number representing the total amount of work
Expand Down Expand Up @@ -2144,15 +2144,6 @@ def _out_progress(self, ti_done, ti_total, ts_done, ts_total,
if ti_done == ti_total:
print(" ")

def filelog(self, package, action):
pass

def error(self, message):
pass

def scriptout(self, msgs):
pass

def _makefmt(self, percent, ts_done, ts_total, progress=True,
pkgname=None, wid1=15):
l = len(str(ts_total))
Expand Down
2 changes: 1 addition & 1 deletion dnf/yum/rpmtrans.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def error(self, message):
dnf.util._terminal_messenger('print', message, sys.stderr)


class LoggingTransactionDisplay(ErrorTransactionDisplay):
class LoggingTransactionDisplay(TransactionDisplay):
'''
Base class for a RPMTransaction display callback class
'''
Expand Down

0 comments on commit 6e2ce41

Please sign in to comment.