← Back to team overview

apport-hackers team mailing list archive

Re: [Merge] lp:~brian-murray/apport/sandbox-gdb into lp:apport


Review: Needs Fixing

> One thing I don't feel great about is the way os.environ is modified
> and restored for LD_LIBRARY_PATH etc as the code is duplicated in
> apport-retrace and apport/report.py so suggestions welcome there!

Most of the subprocess family of calls can take an env= argument pointing to an environment to use for the subprocess. You could factor out a helper function to populate a copy environment, then pass this in to subprocess.call().

>From what I see, the code in apport-retrace isn't ever setting an environment at all, it's saving an environment and then restoring that same environment without ever modifying it in between. So, +1 indeed for factoring this out!
Your team Apport upstream developers is requested to review the proposed merge of lp:~brian-murray/apport/sandbox-gdb into lp:apport.

Follow ups