While this may fix it for DpkgTerminalLog, the fix is not generic so if
another attachment were to be a bytes object and a bug pattern were
written for that attachment we would get the same crash. I think this
code in apport/report.py needs to modified:
if c.hasChildNodes() and c.childNodes[0].nodeType ==
xml.dom.Node.TEXT_NODE:
regexp = c.childNodes[0].nodeValue
v = report[key]
if isinstance(v, problem_report.CompressedValue):
v = v.get_value()
regexp = regexp.encode('UTF-8')
try:
re_c = re.compile(regexp)
except:
continue
if not re_c.search(v):
return None
** Changed in: apport (Ubuntu)
Status: Fix Released => Triaged
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1016380
Title:
apport-gtk crashed with TypeError in _check_bug_pattern(): can't use a
string pattern on a bytes-like object
Status in “apport” package in Ubuntu:
Triaged
Bug description:
crashed when reporting a particular bug.
I'm using quantal.
ProblemType: Crash
DistroRelease: Ubuntu 12.10
Package: apport-gtk 2.2.5-0ubuntu1
ProcVersionSignature: Ubuntu 3.4.0-5.11-generic 3.4.0
Uname: Linux 3.4.0-5-generic x86_64
ApportVersion: 2.2.5-0ubuntu1
Architecture: amd64
CrashCounter: 1
Date: Thu Jun 21 22:51:10 2012
ExecutablePath: /usr/share/apport/apport-gtk
InterpreterPath: /usr/bin/python3.2mu
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/share/apport/apport-gtk
PythonArgs: ['/usr/share/apport/apport-gtk']
SourcePackage: apport
Title: apport-gtk crashed with TypeError in _check_bug_pattern(): can't use a
string pattern on a bytes-like object
UpgradeStatus: Upgraded to quantal on 2012-06-18 (3 days ago)
UserGroups:
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1016380/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp