The problematic part looks to be the following (particularly the if statement):
if os.access(f, os.R_OK): report[ident] = (f,) else: apport.hookutils.attach_root_command_outputs(report, {ident: "cat '%s'" % f})
The problematic part looks to be the following (particularly the if statement):
if os.access(f, os.R_OK):
report[ ident] = (f,)
apport. hookutils. attach_ root_command_ outputs( report,
else:
{ident: "cat '%s'" % f})