There is an apport.hookutils.attach_root_command_outputs() which you can use for running commands as root, yes.
There is an apport. hookutils. attach_ root_command_ outputs( ) which you can use for running commands as root, yes.