Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Default lettuce output does not work when run from a daemon #121

Closed
jamesls opened this Issue · 2 comments

2 participants

@jamesls

When lettuce is run from a daemon (say from a continuous integration server which typically run as daemons), I get one of two errors.

The first repro is:
1) daemonize, then run lettuce. The traceback is:

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/lettuce/registry.py", line 100, in call_hook
    callback(*args, **kw)
  File "/usr/lib/python2.6/site-packages/lettuce/plugins/colored_shell_output.py", line 139, in print_step_ran
    width, height = get_terminal_size()
  File "/usr/lib/python2.6/site-packages/lettuce/plugins/colored_shell_output.py", line 32, in get_terminal_size
    return get_terminal_size_unix()
  File "/usr/lib/python2.6/site-packages/lettuce/plugins/colored_shell_output.py", line 81, in get_terminal_size_unix
    return int(cr[1]), int(cr[0])
TypeError: int() argument must be a string or a number, not 'NoneType'

The second situation we've run into is that from hudson, if you ssh to another remote machine and force a tty allocation (using the -tt since ssh is being run from a daemon), you'll get this traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/lettuce/registry.py", line 100, in call_hook
    callback(*args, **kw)
  File "/usr/lib/python2.6/site-packages/lettuce/plugins/colored_shell_output.py", line 140, in print_step_ran
    lines_up = len(string) / float(width)
ZeroDivisionError: float division by zero

To workaround this, you can use -v 0, but it would be great if some output could still be captured (maybe assuming a default width?)

@gabrielfalcao

I'm working on it, but what happens if you use --verbosity=2, it's supposed to give the output you're looking for.

@gabrielfalcao

small fix on terminal window size guessing. closed by 4488bc9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.