Merge lp://staging/~gz/launchpadlib/trivial_homeless_launchpadlib_dir into lp://staging/launchpadlib
Status: | Merged |
---|---|
Approved by: | Robert Collins |
Approved revision: | 109 |
Merged at revision: | 120 |
Proposed branch: | lp://staging/~gz/launchpadlib/trivial_homeless_launchpadlib_dir |
Merge into: | lp://staging/launchpadlib |
Diff against target: |
17 lines (+4/-2) 1 file modified
src/launchpadlib/launchpad.py (+4/-2) |
To merge this branch: | bzr merge lp://staging/~gz/launchpadlib/trivial_homeless_launchpadlib_dir |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Graham Binns (community) | code | Needs Fixing | |
Review via email: mp+46150@code.staging.launchpad.net |
Commit message
Improve Launchpadlib for windows.
Description of the change
Two changes to launchpadlib_dir behaviour when HOME is not set. Firstly, it may be HOMEDRIVE and HOMEPATH on windows, which os.path.expanduser already has logic for checking, so just use that. Secondly, if expanduser fails (returning the original string starting with a tilde still), raise a useful error giving a hint to either fix the environment or pass a usable value for launchpadlib_dir.
I'd like to poke some of the tests along with this, but they're not syntax compatible with my installed python version and the pain of setuptools and many dependencies is too great for my trunk build. In particular test_launchpad.
I need to add some tests and then I'll land this, probably next week.