Skip to content

Commit

Permalink
Fix the get_name_of_constant to get key from attribute which not begi…
Browse files Browse the repository at this point in the history
…n with "_"

- Relate to Issue ros#209
  • Loading branch information
tutor-obo committed Feb 6, 2023
1 parent 23acb6e commit 41b7771
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionlib/src/actionlib/action_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

def get_name_of_constant(C, n):
for k, v in C.__dict__.items():
if isinstance(v, int) and v == n:
if isinstance(v, int) and v == n and not k.startswith("_"):
return k
return "NO_SUCH_STATE_%d" % n

Expand Down

0 comments on commit 41b7771

Please sign in to comment.