Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch KeyError when SHELL is not set #204

Merged
merged 1 commit into from
May 6, 2015
Merged

Conversation

scpeters
Copy link
Contributor

@scpeters scpeters commented May 1, 2015

Fixes #203.

try:
shell_path = os.environ['SHELL']
except KeyError:
shell_path = ''
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be better to use get:

shell_path = os.environ.get('SHELL', '')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed and squashed

@wjwwood
Copy link
Member

wjwwood commented May 6, 2015

Fix looks good, minor implementation comment, and then +1

Use os.environ.get instead of dictionary,
which raises KeyError when SHELL is not set.
@wjwwood
Copy link
Member

wjwwood commented May 6, 2015

Thanks.

wjwwood added a commit that referenced this pull request May 6, 2015
Catch KeyError when SHELL is not set
@wjwwood wjwwood merged commit c5e597c into catkin:master May 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

catkin build fails if SHELL is not set
2 participants