Merge ~bryce/git-ubuntu:fix_export_orig_empty_tarballs_traceback into git-ubuntu:master
Proposed by
Bryce Harrington
Status: | Merged |
---|---|
Merged at revision: | e2d854c0c8373c7d72aea1d7ad742d503f29b5fe |
Proposed branch: | ~bryce/git-ubuntu:fix_export_orig_empty_tarballs_traceback |
Merge into: | git-ubuntu:master |
Diff against target: |
32 lines (+8/-0) 1 file modified
gitubuntu/build.py (+8/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Robie Basak | Needs Fixing | ||
Review via email: mp+405422@code.launchpad.net |
Description of the change
Sometimes a traceback is displayed when trying to do `git ubuntu export-orig`. Some examples can be seen at LP: #1836286 and LP: #1868631, with traces ending in "object of type 'NoneType' has no len()".
The underlying problem here is that build.fetch_orig() sometimes can't find tarballs successfully by any of its known mechanisms. It should be returning [] (an empty list) in this case, but the function lacks a defined return statement, and so python defaults to returning None.
This branch fixes the problem by adding the missing return [] and adding code docs and an assert to spec the routine's return behavior.
To post a comment you must log in.
FAILED: Continuous integration, rev:547c8bc37fc 79631f79d5239cd e8f44e2da5bcdc /jenkins. ubuntu. com/server/ job/git- ubuntu- ci/46/
https:/
Executed test runs:
SUCCESS: VM Setup
FAILED: Build
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/git- ubuntu- ci/46// rebuild
https:/