Merge lp://staging/~danilo/launchpad/bug-682186 into lp://staging/launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Данило Шеган | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 12066 | ||||
Proposed branch: | lp://staging/~danilo/launchpad/bug-682186 | ||||
Merge into: | lp://staging/launchpad | ||||
Diff against target: |
62 lines (+28/-8) 2 files modified
lib/canonical/launchpad/tests/test_versioninfo.py (+24/-0) lib/canonical/launchpad/versioninfo.py (+4/-8) |
||||
To merge this branch: | bzr merge lp://staging/~danilo/launchpad/bug-682186 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Henning Eggers (community) | code | Approve | |
Aaron Bentley (community) | Needs Fixing | ||
Review via email:
|
Commit message
[no-qa] [rollback=12041] [r=henninge]
Description of the change
= Bug 682186 =
Make sure versioninfo works correctly even when called from a script ran outside the LP root directory. Since all of our cronscripts are run from a different path with absolute command names (eg. $LP_PY $LP_ROOT/
This includes X-Generated-By headers in all LP emails and PO files generated by Launchpad.
I chatted extensively with Gary about this, and the actual fix is really his code (we've gone through a few variants through pastebins). I just triaged a bug, provided a test and worried about the bug fix. :)
I am also doing a follow-up branch which moves the versioninfo to lp.app, but that would make this branch more confusing so I split it up.
I am not really sure what can I do about the lint problems (other than make linter ignore them).
== Tests ==
bin/test -cvvt versioninfo
== Launchpad lint ==
Checking for conflicts and issues in changed files.
Linting changed files:
lib/launchpad
lib/canonical
lib/canonical
./lib/launchpad
20: E303 too many blank lines (3)
./lib/canonical
42: undefined name 'InputError'
I think you mean ImportError-- the linter is quite right to complain about InputError.