Merge lp://staging/~barry/ubuntu-system-image/lp1423622 into lp://staging/~registry/ubuntu-system-image/client

Proposed by Barry Warsaw
Status: Merged
Merged at revision: 318
Proposed branch: lp://staging/~barry/ubuntu-system-image/lp1423622
Merge into: lp://staging/~registry/ubuntu-system-image/client
Diff against target: 369 lines (+201/-34)
6 files modified
systemimage/api.py (+5/-2)
systemimage/curl.py (+3/-1)
systemimage/download.py (+9/-5)
systemimage/main.py (+54/-24)
systemimage/tests/test_main.py (+127/-1)
systemimage/udm.py (+3/-1)
To merge this branch: bzr merge lp://staging/~barry/ubuntu-system-image/lp1423622
Reviewer Review Type Date Requested Status
Michael Vogt Pending
Review via email: mp+251819@code.staging.launchpad.net

Description of the change

--progress

To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :

I'll add NEWS and update the manpage when I merge this into trunk.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for this work Barry, this looks very nice!

There are two changes I would love to see:
1. progress should be unbuffered (that was wrong in my initial branch, sorry). I.e. instead of print(), could you please use sys.stdout.write() and sys.stdout.flush() ?

2. if a exception happens in main.py (cf. http://bazaar.launchpad.net/~ubuntu-system-image/ubuntu-system-image/client/view/head:/systemimage/main.py#L381) it would be nice to get a json error on stdout. Not sure how well this fits into the new schema, I guess it is ok if I get a non-json error on stderr that I can just display to the user.

Revision history for this message
Barry Warsaw (barry) wrote :

On Mar 05, 2015, at 08:05 AM, Michael Vogt wrote:

>1. progress should be unbuffered (that was wrong in my initial branch,
>sorry). I.e. instead of print(), could you please use sys.stdout.write() and
>sys.stdout.flush() ?

Good point, I should have noticed that. I'll fix that asap.

>2. if a exception happens in main.py
>(cf. http://bazaar.launchpad.net/~ubuntu-system-image/ubuntu-system-image/client/view/head:/systemimage/main.py#L381)
>it would be nice to get a json error on stdout. Not sure how well this fits
>into the new schema, I guess it is ok if I get a non-json error on stderr
>that I can just display to the user.

Okay, we chatted on IRC and decided we don't need much here. I've been
meaning to add a simple message to stderr in this case anyway, so that's what
I'll do now.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches