+
+ # convert space-seperated list of tags into a set
+ this_tags = info.getInfoString(serviceref, iServiceInformation.sTags).split(' ')
+ if this_tags == ['']:
+ this_tags = []
+ this_tags = set(this_tags)
+
+ # filter_tags is either None (which means no filter at all), or
+ # a set. In this case, all elements of filter_tags must be present,
+ # otherwise the entry will be dropped.
+ if filter_tags is not None and not this_tags.issuperset(filter_tags):
+ continue
+
+ tags |= this_tags