Merge lp:~mhr3/libunity/fix-1231390 into lp:libunity

Proposed by Michal Hruby
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 295
Merged at revision: 295
Proposed branch: lp:~mhr3/libunity/fix-1231390
Merge into: lp:libunity
Diff against target: 11 lines (+1/-1)
1 file modified
bindings/python/Unity.py (+1/-1)
To merge this branch: bzr merge lp:~mhr3/libunity/fix-1231390
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+187739@code.launchpad.net

Commit message

Allow metadata=None when creating SearchContext from python

Description of the change

Allow metadata=None when creating SearchContext from python.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Paweł Stołowski (stolowski) wrote :

Makes sense. +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bindings/python/Unity.py'
2--- bindings/python/Unity.py 2013-09-17 17:37:36 +0000
3+++ bindings/python/Unity.py 2013-09-26 11:50:00 +0000
4@@ -126,7 +126,7 @@
5 @staticmethod
6 def create(search_query, search_type, filter_state, metadata_dict, result_set, cancellable):
7 context = Unity.SearchContext.create(search_query, search_type, filter_state, None, result_set, cancellable)
8- if len(metadata_dict) > 0:
9+ if metadata_dict and len(metadata_dict) > 0:
10 metadata_variant = dict_to_variant(metadata_dict)
11 context.set_search_metadata(Unity.SearchMetadata.create_from_variant(metadata_variant))
12

Subscribers

People subscribed via source and target branches