Skip to content

Commit

Permalink
Evaluate filter() generator before returning in get_param_names() whi…
Browse files Browse the repository at this point in the history
…ch is required when using python3. Fixes #527. (#540)
  • Loading branch information
stevegolton committed Nov 24, 2020
1 parent f3888b6 commit 2c5d630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rosapi/src/rosapi/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def get_param_names(params_glob):
with param_server_lock:
if params_glob:
# If there is a parameter glob, filter by it.
return filter(lambda x: any(fnmatch.fnmatch(str(x), glob) for glob in params_glob), rospy.get_param_names())
return list(filter(lambda x: any(fnmatch.fnmatch(str(x), glob) for glob in params_glob), rospy.get_param_names()))
else:
# If there is no parameter glob, don't filter.
return rospy.get_param_names()
Expand Down

0 comments on commit 2c5d630

Please sign in to comment.