Skip to content

Commit

Permalink
Merge pull request #700 from wkentaro/indigo-message_filters-getattr-…
Browse files Browse the repository at this point in the history
…subscriber

Add __getattr__ to handle sub in message_filters as standard one
  • Loading branch information
dirk-thomas committed Nov 15, 2015
2 parents 078c8d6 + 0bf673a commit 6ec3890
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utilities/message_filters/src/message_filters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ def callback(self, msg):
def getTopic(self):
return self.topic

def unregister(self):
self.sub.unregister()
def __getattr__(self, key):
"""Serve same API as rospy.Subscriber"""
return self.sub.__getattribute__(key)

class Cache(SimpleFilter):

Expand Down

0 comments on commit 6ec3890

Please sign in to comment.