Merge lp://qastaging/~sergiusens/snapcraft/localplugs-- into lp://qastaging/~snappy-dev/snapcraft/core

Proposed by Sergio Schvezov
Status: Merged
Approved by: Sergio Schvezov
Approved revision: 193
Merged at revision: 193
Proposed branch: lp://qastaging/~sergiusens/snapcraft/localplugs--
Merge into: lp://qastaging/~snappy-dev/snapcraft/core
Prerequisite: lp://qastaging/~sergiusens/snapcraft/module_name
Diff against target: 92 lines (+15/-33)
2 files modified
snapcraft/plugin.py (+15/-19)
snapcraft/tests/test_plugin.py (+0/-14)
To merge this branch: bzr merge lp://qastaging/~sergiusens/snapcraft/localplugs--
Reviewer Review Type Date Requested Status
Sergio Schvezov Approve
Leo Arias (community) Approve
Review via email: mp+271907@code.qastaging.launchpad.net

Commit message

Local plugins as fallback instead of special casing to follow the spec

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

+def local_plugindir():

this is only used in the plugin.py file, so you can use this opportunity to make it internal: _local_plugindir.

Approve anyway as it's not a blocker.

review: Approve
Revision history for this message
Leo Arias (elopio) wrote :

oh, and I think you don't need this:

+ module = None
+ if not module:

Just assign the module on the except ImportError: block.

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

On Tue, Sep 22, 2015 at 1:34 AM, Leo Arias <email address hidden> wrote:

> oh, and I think you don't need this:
>
> + module = None
> + if not module:
>
> Just assign the module on the except ImportError: block.
>

I had that initially, I just didn't like the Exception within Exception
error so I kept the handler at a minimum ;-)

193. By Sergio Schvezov

Make local_plugin private

Revision history for this message
Sergio Schvezov (sergiusens) :
review: Approve

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