# Path: dnf/i18n.py
# class UnicodeStream(object):
#     def __init__(self, stream, encoding):
#     def write(self, s):
#     def __getattr__(self, name):
# def _full_ucd_support(encoding):
# def _guess_encoding():
# def setup_locale():
# def setup_stdout():
# def ucd_input(ucstring):
# def ucd(obj):
# def _exact_width_char(uchar):
# def chop_str(msg, chop=None):
# def exact_width(msg):
# def fill_exact_width(msg, fill, chop=None, left=True, prefix='', suffix=''):
# def textwrap_fill(text, width=70, initial_indent='', subsequent_indent=''):
#     def _indent_at_beg(line):
# def select_short_long(width, msg_short, msg_long):
# def translation(name):
#     def ucd_wrapper(fnc):
# def pgettext(context, message):
# _, P_ = translation("dnf")
# C_ = pgettext


import libdnf.transaction
import dnf.callback
import dnf.transaction
import dnf.util
import rpm
import os
import logging
import sys
import tempfile
import traceback
import warnings
from dnf.i18n import _, ucd
        self.progress(pkg, dnf.transaction.PKG_VERIFY, 100, 100, count, total)


class ErrorTransactionDisplay(TransactionDisplay):

    """An RPMTransaction display that prints errors to standard output."""

    def error(self, message):
        super(ErrorTransactionDisplay, self).error(message)
        dnf.util._terminal_messenger('print', message, sys.stderr)


class LoggingTransactionDisplay(TransactionDisplay):
    '''
    Base class for a RPMTransaction display callback class
    '''
    def __init__(self):
        super(LoggingTransactionDisplay, self).__init__()
        self.rpm_logger = logging.getLogger('dnf.rpm')

    def error(self, message):
        self.rpm_logger.error(message)

    def filelog(self, package, action):
        action_str = dnf.transaction.FILE_ACTIONS[action]
        msg = '%s: %s' % (action_str, package)
        self.rpm_logger.log(dnf.logging.SUBDEBUG, msg)

    def scriptout(self, msgs):
        if msgs:

# Path: dnf/i18n.py
# class UnicodeStream(object):
#     def __init__(self, stream, encoding):
#     def write(self, s):
#     def __getattr__(self, name):
# def _full_ucd_support(encoding):
# def _guess_encoding():
# def setup_locale():
# def setup_stdout():
# def ucd_input(ucstring):
# def ucd(obj):
# def _exact_width_char(uchar):
# def chop_str(msg, chop=None):
# def exact_width(msg):
# def fill_exact_width(msg, fill, chop=None, left=True, prefix='', suffix=''):
# def textwrap_fill(text, width=70, initial_indent='', subsequent_indent=''):
#     def _indent_at_beg(line):
# def select_short_long(width, msg_short, msg_long):
# def translation(name):
#     def ucd_wrapper(fnc):
# def pgettext(context, message):
# _, P_ = translation("dnf")
# C_ = pgettext


# Path: dnf/yum/rpmtrans.py
import libdnf.transaction
import dnf.callback
import dnf.transaction
import dnf.util
import rpm
import os
import logging
import sys
import tempfile
import traceback
import warnings
from dnf.i18n import _, ucd

        self.progress(pkg, dnf.transaction.PKG_VERIFY, 100, 100, count, total)


class ErrorTransactionDisplay(TransactionDisplay):

    """An RPMTransaction display that prints errors to standard output."""

    def error(self, message):
        super(ErrorTransactionDisplay, self).error(message)
        dnf.util._terminal_messenger('print', message, sys.stderr)


class LoggingTransactionDisplay(TransactionDisplay):
    '''
    Base class for a RPMTransaction display callback class
    '''
    def __init__(self):
        super(LoggingTransactionDisplay, self).__init__()
        self.rpm_logger = logging.getLogger('dnf.rpm')

    def error(self, message):
        self.rpm_logger.error(message)

    def filelog(self, package, action):
        action_str = dnf.transaction.FILE_ACTIONS[action]
        msg = '%s: %s' % (action_str, package)
        self.rpm_logger.log(dnf.logging.SUBDEBUG, msg)

    def scriptout(self, msgs):
        if msgs:

            self.rpm_logger.info(ucd(msgs))