# Path: dnf/yum/misc.py
# def re_glob(s):
# def re_full_search_needed(s):
# def get_default_chksum_type():
#     def __init__(self, iter=None):
#     def __iter__(self):
#     def __getitem__(self, item):
#     def all_lists(self):
#     def merge_lists(self, other):
# def procgpgkey(rawkey):
# def keyInstalled(ts, keyid, timestamp):
# def import_key_to_pubring(rawkey, keyid, gpgdir=None, make_ro_copy=True):
# def getCacheDir():
# def seq_max_split(seq, max_entries):
# def unlink_f(filename):
# def stat_f(filename, ignore_EACCES=False):
# def _getloginuid():
# def getloginuid():
# def decompress(filename, dest=None, check_timestamps=False):
# def read_in_items_from_dot_dir(thisglob, line_as_list=True):
# class GenericHolder(object):
# 
# 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


from dnf.yum import misc
from dnf.i18n import ucd, _
from dnf.pycomp import basestring, urlparse
import fnmatch
import dnf.conf.substitutions
import dnf.const
import dnf.exceptions
import dnf.pycomp
import dnf.util
import hawkey
import logging
import os
import libdnf.conf
import libdnf.repo
import tempfile
                option.set(priority, value)
            except Exception:
                pass
        else:
            try:
                if isinstance(value, list) or isinstance(value, tuple):
                    option.set(priority, libdnf.conf.VectorString(value))
                elif (isinstance(option, libdnf.conf.OptionBool)
                      or isinstance(option, libdnf.conf.OptionChildBool)
                      ) and isinstance(value, int):
                    option.set(priority, bool(value))
                else:
                    option.set(priority, value)
            except RuntimeError as e:
                raise dnf.exceptions.ConfigError(_("Error parsing '%s': %s")
                                                 % (value, str(e)),
                                                 raw_error=str(e))

    def _populate(self, parser, section, filename, priority=PRIO_DEFAULT):
        """Set option values from an INI file section."""
        if parser.hasSection(section):
            for name in parser.options(section):
                value = parser.getSubstitutedValue(section, name)
                if not value or value == 'None':
                    value = ''
                if hasattr(self._config, name):
                    try:
                        self._config.optBinds().at(name).newString(priority, value)
                    except RuntimeError as e:
                        logger.error(_('Invalid configuration value: %s=%s in %s; %s'),

# Path: dnf/yum/misc.py
# def re_glob(s):
# def re_full_search_needed(s):
# def get_default_chksum_type():
#     def __init__(self, iter=None):
#     def __iter__(self):
#     def __getitem__(self, item):
#     def all_lists(self):
#     def merge_lists(self, other):
# def procgpgkey(rawkey):
# def keyInstalled(ts, keyid, timestamp):
# def import_key_to_pubring(rawkey, keyid, gpgdir=None, make_ro_copy=True):
# def getCacheDir():
# def seq_max_split(seq, max_entries):
# def unlink_f(filename):
# def stat_f(filename, ignore_EACCES=False):
# def _getloginuid():
# def getloginuid():
# def decompress(filename, dest=None, check_timestamps=False):
# def read_in_items_from_dot_dir(thisglob, line_as_list=True):
# class GenericHolder(object):
# 
# 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/conf/config.py
from dnf.yum import misc
from dnf.i18n import ucd, _
from dnf.pycomp import basestring, urlparse
import fnmatch
import dnf.conf.substitutions
import dnf.const
import dnf.exceptions
import dnf.pycomp
import dnf.util
import hawkey
import logging
import os
import libdnf.conf
import libdnf.repo
import tempfile

                option.set(priority, value)
            except Exception:
                pass
        else:
            try:
                if isinstance(value, list) or isinstance(value, tuple):
                    option.set(priority, libdnf.conf.VectorString(value))
                elif (isinstance(option, libdnf.conf.OptionBool)
                      or isinstance(option, libdnf.conf.OptionChildBool)
                      ) and isinstance(value, int):
                    option.set(priority, bool(value))
                else:
                    option.set(priority, value)
            except RuntimeError as e:
                raise dnf.exceptions.ConfigError(_("Error parsing '%s': %s")
                                                 % (value, str(e)),
                                                 raw_error=str(e))

    def _populate(self, parser, section, filename, priority=PRIO_DEFAULT):
        """Set option values from an INI file section."""
        if parser.hasSection(section):
            for name in parser.options(section):
                value = parser.getSubstitutedValue(section, name)
                if not value or value == 'None':
                    value = ''
                if hasattr(self._config, name):
                    try:
                        self._config.optBinds().at(name).newString(priority, value)
                    except RuntimeError as e:
                        logger.error(_('Invalid configuration value: %s=%s in %s; %s'),

                                     ucd(name), ucd(value), ucd(filename), str(e))