Code review comment for lp:~abentley/launchpad/twisted-environ

Revision history for this message
Aaron Bentley (abentley) wrote :

= Summary =
Fix environment variable handling in twisted job runner.

== Proposed fix ==
The twisted job runner must run a subprocess, and preserve PATH, PYTHONPATH,
and LPCONFIG. But LPCONFIG is an optional environment variable, so it should
be provided to the subprocess only when provided to the main process.

== Pre-implementation notes ==
None

== Implementation details ==
None

== Tests ==
None. This fix only applies to interactive use, and not the test environment.
In the test environment, LPCONFIG is always specified.

== Demo and Q/A ==
cronscripts/update_preview_diff --twisted

If this doesn't give a KeyError, it worked.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/services/job/runner.py

== Pylint notices ==

lib/lp/services/job/runner.py
    35: [F0401] Unable to import 'lazr.delegates' (No module named delegates)

« Back to merge proposal