Skip to content

Commit

Permalink
Add __getattr__ to handle sub in message_filters as standard one
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Nov 10, 2015
1 parent 078c8d6 commit 0bf673a
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 0bf673a

Please sign in to comment.