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:

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
Executed test runs:

Click here to trigger a 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 }
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+ }
14 for (unsigned int i = 0; i < json_array_get_length(plugarray); i++)
15 {
16 auto ifaceobj = json_array_get_object_element(plugarray, i);


People subscribed via source and target branches