plugin methods return True

Bug #1481122 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Medium
Sergio Schvezov

Bug Description

It seems to be that on the plugin methods we are returning True to signal that everything went well.
I think it will be better to return nothing in case of success, or the artifact generated in case it's needed for other steps.
In case of error, we raise an exception.

Related branches

Changed in snapcraft:
milestone: none → 0.4
Changed in snapcraft:
assignee: nobody → Sergio Schvezov (sergiusens)
importance: Undecided → Medium
status: New → In Progress
Changed in snapcraft:
status: In Progress → Fix Committed
Revision history for this message
Leo Arias (elopio) wrote :

There are still a few places where a boolean is returned to notify success. Lets fix them for the next milestone.

Changed in snapcraft:
status: Fix Committed → Confirmed
Revision history for this message
Leo Arias (elopio) wrote :

in lifecycle.py:
- stage
- snap

in cmds.py:
- _check_for_collisions

in repo.py:
- _try_copy_local

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

But but but the bug was just for plugins :-)

Can we create a new bug for these?

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

Riiight, you found a legal hole here :) I didn't notice the title I set. Lets open a new one.

Changed in snapcraft:
status: Confirmed → Fix Committed
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Released in snapcraft 0.4

Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.