Code review comment for lp://staging/~gary/charms/oneiric/buildbot-master/run-as-buildbot

Revision history for this message
Francesco Banconi (frankban) wrote :

> All those helpers are taken from setuplxc.py, btw.
>
> The su contextmanager has an issue: the euid and egid are not set back
> properly when there is an error in the with block, for some reason.

Trapping the error (re-raised inside the generator) using a try/finally statement should solve this.
E.g. http://pastebin.ubuntu.com/836410/

« Back to merge proposal