Merge lp://qastaging/~mvo/snapcraft/run-and-exlode into lp://qastaging/~snappy-dev/snapcraft/core

Proposed by Michael Vogt
Status: Work in progress
Proposed branch: lp://qastaging/~mvo/snapcraft/run-and-exlode
Merge into: lp://qastaging/~snappy-dev/snapcraft/core
Diff against target: 37 lines (+5/-3)
2 files modified
snapcraft/common.py (+1/-1)
snapcraft/meta.py (+4/-2)
To merge this branch: bzr merge lp://qastaging/~mvo/snapcraft/run-and-exlode
Reviewer Review Type Date Requested Status
Colin Watson (community) Needs Fixing
Snappy Developers Pending
Review via email: mp+272386@code.qastaging.launchpad.net

Description of the change

Tiny branch that makes common.run() use subprocess.check_call() to ensure proper exceptions are raised when a call fails.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve
Revision history for this message
Colin Watson (cjwatson) wrote :

I think this is the right direction, but there seem to be other bits of code that at least need some checking. Anything that calls run() expecting a boolean needs to be checked. Quite a few plugin build and pull methods call run(), so these either need to stop expecting to return boolean or need to massage the exception into a boolean return. The code would likely be a lot easier to read when you're finished though ...

review: Needs Fixing
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

On Fri, Sep 25, 2015 at 9:32 AM, Colin Watson <email address hidden>
wrote:

> Review: Needs Fixing
>
> I think this is the right direction, but there seem to be other bits of
> code that at least need some checking. Anything that calls run() expecting
> a boolean needs to be checked. Quite a few plugin build and pull methods
> call run(), so these either need to stop expecting to return boolean or
> need to massage the exception into a boolean return. The code would likely
> be a lot easier to read when you're finished though ...

I agree, there is a bug that addresses this big problem for the whole system

Unmerged revisions

211. By Michael Vogt

use subprocess.check_call() instead of call() to ensure proper errors are raised on failure

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