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

Proposed by Ted Gould on 2017-04-03
Status: Approved
Approved by: dobey on 2017-04-05
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) 2017-04-03 Approve on 2017-04-05
unity-api-1-bot continuous-integration Needs Fixing on 2017-04-03
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.
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)
dobey (dobey) wrote :

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

review: Approve

Unmerged revisions

308. By Ted Gould on 2017-04-03

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