@@ -183,7 +183,7 @@ def meta_wrapper(*args, **kw_args):
183
183
meta_wrapper .__name__ = method_name
184
184
docstrings = list ()
185
185
for planner in self .get_planners_recursive (method_name ):
186
- if hasattr ( planner , method_name ):
186
+ if planner . has_planning_method ( method_name ):
187
187
planner_method = getattr (planner , method_name )
188
188
docstrings .append ((planner , planner_method ))
189
189
@@ -225,7 +225,7 @@ def __str__(self):
225
225
226
226
def get_planners (self , method_name ):
227
227
return [planner for planner in self ._planners
228
- if hasattr ( planner , method_name )]
228
+ if planner . has_planning_method ( method_name )]
229
229
230
230
def plan (self , method , args , kw_args ):
231
231
from ..util import Timer
@@ -234,7 +234,7 @@ def plan(self, method, args, kw_args):
234
234
235
235
for planner in self ._planners :
236
236
try :
237
- if hasattr ( planner , method ):
237
+ if planner . has_planning_method ( method ):
238
238
logger .info ('Sequence - Calling planner "%s".' , str (planner ))
239
239
planner_method = getattr (planner , method )
240
240
kw_args ['defer' ] = False
@@ -268,7 +268,7 @@ def __str__(self):
268
268
269
269
def get_planners (self , method_name ):
270
270
return [planner for planner in self ._planners
271
- if hasattr ( planner , method_name )]
271
+ if planner . has_planning_method ( method_name )]
272
272
273
273
def plan (self , method , args , kw_args ):
274
274
all_planners = self ._planners
@@ -277,7 +277,7 @@ def plan(self, method, args, kw_args):
277
277
278
278
# Find only planners that support the required planning method.
279
279
for index , planner in enumerate (all_planners ):
280
- if not hasattr ( planner , method ):
280
+ if not planner . has_planning_method ( method ):
281
281
results [index ] = PlanningError (
282
282
"{:s} does not implement method {:s}."
283
283
.format (planner , method )
@@ -337,7 +337,7 @@ def __str__(self):
337
337
338
338
def get_planners (self , method_name ):
339
339
return [planner for planner in self ._planners
340
- if hasattr ( planner , method_name )]
340
+ if planner . has_planning_method ( method_name )]
341
341
342
342
def plan (self , method , args , kw_args ):
343
343
for planner in self ._planners :
0 commit comments