Merge lp:~dooferlad/linaro-license-protection/api-updates into lp:~linaro-automation/linaro-license-protection/trunk
Status: | Merged |
---|---|
Approved by: | Milo Casagrande |
Approved revision: | 180 |
Merged at revision: | 179 |
Proposed branch: | lp:~dooferlad/linaro-license-protection/api-updates |
Merge into: | lp:~linaro-automation/linaro-license-protection/trunk |
Diff against target: |
306 lines (+150/-91) 3 files modified
license_protected_downloads/tests/test_views.py (+24/-0) license_protected_downloads/views.py (+22/-11) scripts/download.py (+104/-80) |
To merge this branch: | bzr merge lp:~dooferlad/linaro-license-protection/api-updates |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Milo Casagrande (community) | Approve | ||
Review via email: mp+153903@code.launchpad.net |
Description of the change
Minor update to the API so <server>
Updated download.py. Now it is a full, interactive download script:
download.py <URL of directory>
- download all files in directory
download <URL of file>
- download single file
Both of the above require the user to accept each license once. Once a license has been accepted the digest is stored so they don't have to re-accept an unchanged license.
Have split up download.py so the guts of the work is done in a single function, but set up and some messing around with URLs is moved out into a class. This improves readability. Since it is designed as executable documentation, it seems reasonable to take the cruft out of the main function.
Hey James,
thanks for working on this, it looks good to go.
For the download.py file, as long as it is a demo, it looks OK too, otherwise there might be a couple of changes to apply. I hope we can provide a good CLI-client for this in the future.