Skip to content

Switch to get for Dict lookup to prevent KeyError#3043

Merged
mikeferguson merged 1 commit intomoveit:mainfrom
brendandburns:main
Oct 27, 2024
Merged

Switch to get for Dict lookup to prevent KeyError#3043
mikeferguson merged 1 commit intomoveit:mainfrom
brendandburns:main

Conversation

@brendandburns
Copy link
Contributor

@brendandburns brendandburns commented Oct 27, 2024

Description

If you run the default generated configs for MoveIt on a headless system where DISPLAY isn't defined in the environment, this code crashes with a KeyError. Switch to use dict.get(DISPLAY, "") which returns "" instead of
throwing.

Checklist

Copy link
Contributor

@mikeferguson mikeferguson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - I've actually run into this issue previously

@mikeferguson mikeferguson added this pull request to the merge queue Oct 27, 2024
Merged via the queue into moveit:main with commit d2ab1b6 Oct 27, 2024
@sea-bass sea-bass added the backport-humble Mergify label that triggers a PR backport to Humble label Jan 4, 2025
mergify bot pushed a commit that referenced this pull request Jan 4, 2025
sea-bass pushed a commit that referenced this pull request Jan 4, 2025
(cherry picked from commit d2ab1b6)

Co-authored-by: Brendan Burns <5751682+brendandburns@users.noreply.github.com>
Markus-Simonsen pushed a commit to Markus-Simonsen/moveit2 that referenced this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-humble Mergify label that triggers a PR backport to Humble

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants