Project

Profile

Help

Issue #2346 ยป repoview-unicode.diff

quick patch for /usr/bin/repoview - cretep, 07/26/2017 04:04 PM

View differences:

repoview-bytes 2017-07-17 09:21:57.168504000 +0100
self.opts.force = True
self.sconn = sqlite.connect(statedb)
self.sconn.text_factory = bytes
scursor = self.sconn.cursor()
query = """CREATE TABLE IF NOT EXISTS state (
......
self.say('Opening primary database...')
primary = self.z_handler(primary)
self.pconn = sqlite.connect(primary)
self.pconn.text_factory = bytes
self.say('done\n')
self.say('Opening changelogs database...')
other = self.z_handler(other)
self.oconn = sqlite.connect(other)
self.oconn.text_factory = bytes
self.say('done\n')
if self.opts.comps:
......
(pkg_key, epoch, version, release, arch, summary,
description, url, time_build, rpm_license, rpm_sourcerpm,
size_package, location_href, vendor) = row
summary = unicode(summary or '', errors='ignore')
description = unicode(description or '', errors='ignore')
url = unicode(url or '', errors='ignore')
location_href = unicode(location_href or '', errors='ignore')
vendor = unicode(vendor or '', errors='ignore')
if pkg_data['summary'] is None:
pkg_data['summary'] = summary
pkg_data['description'] = description
    (1-1/1)