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

Handle case in which terminal width can't be read. #123

Closed
wants to merge 2 commits into from

Conversation

simonlynen
Copy link

Fixes the following error, that I got on an osx jenkins slave.

stty: stdin isn't a terminal
Creating build space directory, '/Users/slynen/workspace/minkindr/label/osx/build'
[build] Runtime: 0.0 seconds
Traceback (most recent call last):
  File "/usr/local/bin/catkin", line 9, in <module>
    load_entry_point('catkin-tools==0.2.0', 'console_scripts', 'catkin')()
  File "/Library/Python/2.7/site-packages/catkin_tools-0.2.0-py2.7.egg/catkin_tools/commands/catkin.py", line 198, in main
    sys.exit(args.main(args) or 0)
  File "/Library/Python/2.7/site-packages/catkin_tools-0.2.0-py2.7.egg/catkin_tools/verbs/catkin_build/cli.py", line 219, in main
    no_notify=opts.no_notify
  File "/Library/Python/2.7/site-packages/catkin_tools-0.2.0-py2.7.egg/catkin_tools/verbs/catkin_build/build.py", line 413, in build_isolated_workspace
    log(context.summary(summary_notes))
  File "/Library/Python/2.7/site-packages/catkin_tools-0.2.0-py2.7.egg/catkin_tools/context.py", line 396, in summary
    _, term_cols = os.popen('stty size', 'r').read().split()
ValueError: need more than 0 values to unpack

@@ -34,6 +34,13 @@
color_mapper = ColorMapper()
clr = color_mapper.clr

Copy link
Contributor

Choose a reason for hiding this comment

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

You need another blank line before the function definition for pep 8 compliance.

@simonlynen
Copy link
Author

@tfoote thanks for the review, does this lgty?

@tfoote
Copy link
Contributor

tfoote commented Oct 21, 2014

This looks like #122 where @wjwwood pointed to a method which already does this and has osx support: https://github.com/catkin/catkin_tools/blob/master/catkin_tools/common.py#L258

@simonlynen
Copy link
Author

great, then I just close this and pull the fix once #122 is merged. Thanks

@simonlynen simonlynen closed this Oct 21, 2014
@simonlynen simonlynen deleted the fix/stty_remote_shell branch October 21, 2014 23:05
@tfoote
Copy link
Contributor

tfoote commented Oct 22, 2014

#122 doesn't currently have an implementation, it's just the issue.

@simonlynen simonlynen restored the fix/stty_remote_shell branch October 22, 2014 00:18
@simonlynen
Copy link
Author

@tfoote ok, then I will put up an updated PR tomorrow.

@tfoote
Copy link
Contributor

tfoote commented Oct 22, 2014

Great thanks!

@wjwwood
Copy link
Member

wjwwood commented Oct 22, 2014

I opened one just now: #124

@simonlynen simonlynen deleted the fix/stty_remote_shell branch October 23, 2014 07:57
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.

None yet

3 participants