Skip to content

Commit f022195

Browse files
author
Rachel Holladay
committed
Allowing generic case
1 parent e0f0ecc commit f022195

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/prpy/base/robot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ def wrapper_method(*args, **kw_args):
110110

111111
delegate_method = self.actions.get_action(name)
112112
@functools.wraps(delegate_method)
113-
def wrapper_method(obj, *args, **kw_args):
114-
return delegate_method(self, obj, *args, **kw_args)
113+
def wrapper_method(*args, **kw_args):
114+
return delegate_method(self, *args, **kw_args)
115115
return wrapper_method
116116

117117
raise AttributeError('{0:s} is missing method "{1:s}".'.format(repr(self), name))

src/prpy/tsr/tsrlibrary.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,11 @@ def __call__(self, kinbody, action_name, *args, **kw_args):
9898
raise KeyError('There is no TSR factory registered for action "{:s}"'
9999
' with robot "{:s}" and object "{:s}".'.format(
100100
action_name, self.robot_name, kinbody_name))
101-
102-
return f(self.robot, kinbody=kinbody, *args, **kw_args)
101+
102+
if kinbody is None:
103+
return f(self.robot, *args, **kw_args)
104+
else:
105+
return f(self.robot, kinbody, *args, **kw_args)
103106

104107
def load_yaml(self, yaml_file):
105108
"""

0 commit comments

Comments
 (0)