Merge lp:~davidc3/unity-scope-devhelp/glib-bindings-crash into lp:unity-scope-devhelp

Proposed by David Callé on 2014-03-28
Status: Merged
Approved by: Paweł Stołowski on 2014-03-28
Approved revision: 31
Merged at revision: 31
Proposed branch: lp:~davidc3/unity-scope-devhelp/glib-bindings-crash
Merge into: lp:unity-scope-devhelp
Diff against target: 36 lines (+2/-14)
2 files modified
data/devhelp.scope.in (+1/-1)
src/unity_devhelp_daemon.py (+1/-13)
To merge this branch: bzr merge lp:~davidc3/unity-scope-devhelp/glib-bindings-crash
Reviewer Review Type Date Requested Status
Paweł Stołowski 2014-03-28 Approve on 2014-03-28
PS Jenkins bot continuous-integration Approve on 2014-03-28
Review via email: mp+213215@code.launchpad.net

Commit message

Don't crash Unity bindings when building results.

Description of the change

- Don't crash Unity bindings when building results.
- Add dev, help and doc keywords

Test plan : https://wiki.ubuntu.com/Process/Merges/TestPlan/unity-scope-devhelp

 * Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes) Yes
 * Did you build your software in a clean sbuild/pbuilder chroot or ppa? Yes
 * Has your component "TestPlan” been executed successfully on desktop? Yes
 * If you changed the packaging (debian), did you subscribe a core-dev to this MP? N/A
 * If you changed the UI, did you subscribe the design-reviewers to this MP? N/A
 * What components might get impacted by your changes? None
 * Have you requested review by the teams of these owning components? N/A

To post a comment you must log in.
Paweł Stołowski (stolowski) wrote :

Looking good. +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/devhelp.scope.in'
2--- data/devhelp.scope.in 2013-07-16 13:02:05 +0000
3+++ data/devhelp.scope.in 2014-03-28 08:55:21 +0000
4@@ -3,7 +3,7 @@
5 DBusPath=/com/canonical/unity/scope/developer/devhelp
6 Icon=
7 QueryBinary=devhelp
8-_Keywords=devhelp;
9+_Keywords=devhelp;dev;help;doc;
10 RequiredMetadata=
11 OptionalMetadata=
12 Loader=/usr/share/unity-scopes/devhelp/unity_devhelp_daemon.py
13
14=== modified file 'src/unity_devhelp_daemon.py'
15--- src/unity_devhelp_daemon.py 2013-04-22 12:43:19 +0000
16+++ src/unity_devhelp_daemon.py 2014-03-28 08:55:21 +0000
17@@ -205,19 +205,7 @@
18 i['comment'] = ''
19 if not 'dnd_uri' in i or not i['dnd_uri'] or i['dnd_uri'] == '':
20 i['dnd_uri'] = i['uri']
21- i['metadata'] = {}
22- if EXTRA_METADATA:
23- for e in i:
24- for m in EXTRA_METADATA:
25- if m['id'] == e:
26- i['metadata'][e] = i[e]
27- i['metadata']['provider_credits'] = GLib.Variant('s', PROVIDER_CREDITS)
28- result = Unity.ScopeResult.create(str(i['uri']), str(i['icon']),
29- i['category'], i['result_type'],
30- str(i['mimetype']), str(i['title']),
31- str(i['comment']), str(i['dnd_uri']),
32- i['metadata'])
33- result_set.add_result(result)
34+ result_set.add_result(**i)
35 except Exception as error:
36 print(error)
37

Subscribers

People subscribed via source and target branches

to all changes: