Merge lp://qastaging/~fboudra/linaro-ci/use-new-api-to-download-file into lp://qastaging/linaro-ci
Proposed by
Fathi Boudra
Status: | Merged |
---|---|
Approved by: | Milo Casagrande |
Approved revision: | 140 |
Merged at revision: | 140 |
Proposed branch: | lp://qastaging/~fboudra/linaro-ci/use-new-api-to-download-file |
Merge into: | lp://qastaging/linaro-ci |
Diff against target: |
147 lines (+114/-27) 1 file modified
download_file (+114/-27) |
To merge this branch: | bzr merge lp://qastaging/~fboudra/linaro-ci/use-new-api-to-download-file |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Milo Casagrande (community) | Approve | ||
Review via email: mp+157823@code.qastaging.launchpad.net |
Description of the change
Switch download file to the new API.
It's the example provided by James in http://
To post a comment you must log in.
Hi Fathi,
overall it looks good, I guess the automation for the non-interactiveness is the use of the env variable:
+ skip_license = os.environ. get('SKIP_ LICENSE' ) lic["text" ])
+ if skip_license is None:
+ # Licenses are stored as HTML. Convert them to markdown
+ # (text) and print it to the terminal.
+ print html2text(
+
+ # Ask the user if they accept the license. If they don't we
+ # terminate the script.
+ user_response = raw_input(
+ "Do you accept this license? (y/N)")
+ if user_response != "y":
+ exit(1)
Why not just skip all that part? I guess this will be only used inside a CI job.
Anyway, it is not a big deal and is good to go even like it is now.