Skip to content

Commit

Permalink
Corrected bug in get_service_references()
Browse files Browse the repository at this point in the history
If no service matches the given specification or LDAP filter, the
filtering loop on service references must be ignored.

Note: maybe this method should be removed...
  • Loading branch information
tcalmant committed Apr 23, 2014
1 parent 187d597 commit d5fe2e7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pelix/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -1362,9 +1362,10 @@ def get_service_references(self, clazz, ldap_filter=None):
calling bundle and matching the filters.
"""
refs = self.__framework.find_service_references(clazz, ldap_filter)
for ref in refs:
if ref.get_bundle() is not self.__bundle:
refs.remove(ref)
if refs:
for ref in refs:
if ref.get_bundle() is not self.__bundle:
refs.remove(ref)

return refs

Expand Down

0 comments on commit d5fe2e7

Please sign in to comment.