Merge lp:~ted/ubuntu-app-launch/snap-no-interface-no-error into lp:ubuntu-app-launch

Proposed by Ted Gould
Status: Approved
Approved by: dobey
Approved revision: 308
Proposed branch: lp:~ted/ubuntu-app-launch/snap-no-interface-no-error
Merge into: lp:ubuntu-app-launch
Diff against target: 16 lines (+6/-0)
1 file modified
libubuntu-app-launch/snapd-info.cpp (+6/-0)
To merge this branch: bzr merge lp:~ted/ubuntu-app-launch/snap-no-interface-no-error
Reviewer Review Type Date Requested Status
dobey (community) Approve
unity-api-1-bot continuous-integration Needs Fixing
Review via email: mp+321713@code.launchpad.net

Commit message

Don't warn when there are no snaps installed

Description of the change

This is cleans up the commands for people who don't have any snaps installed (not Pete).

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

FAILED: Continuous integration, rev:308
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/293/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/1904/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1911
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1693
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1693/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1693
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1693/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1693/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1693
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1693/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1693
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1693/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1693
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1693/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/293/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
dobey (dobey) wrote :

Reading the name of this branch in the voice of Bob Marley.

review: Approve

Unmerged revisions

308. By Ted Gould

Handle the case of no plugs

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libubuntu-app-launch/snapd-info.cpp'
2--- libubuntu-app-launch/snapd-info.cpp 2016-11-17 16:58:26 +0000
3+++ libubuntu-app-launch/snapd-info.cpp 2017-04-03 14:50:38 +0000
4@@ -341,6 +341,12 @@
5 }
6
7 auto plugarray = json_object_get_array_member(interface, "plugs");
8+ if (plugarray == nullptr)
9+ {
10+ g_debug("No plugs connected on snapd");
11+ return;
12+ }
13+
14 for (unsigned int i = 0; i < json_array_get_length(plugarray); i++)
15 {
16 auto ifaceobj = json_array_get_object_element(plugarray, i);

Subscribers

People subscribed via source and target branches