> Ok, in fact it is working ; the TERM environment variable was wrongly
> set up.
>
> So the real bug are :
> - why does dstat complain about missing python-curses instead of a wrong TERM environnement ? (not an ubuntu bug)
> - why is the default xubuntu terminal application reporting a wrong TERM ? (Bug #659023)
>
> So we can close this bug.
>
> ** Changed in: dstat (Ubuntu)
> Status: New => Invalid
Quite easy, the block that tests for a functional curses apparently fails
on Ubuntu 10.10. What TERM was set in this case so I can reproduce the
problem and see if another error message makes any sense in this case ?
----
def gettermcolor(color=True):
"Return whether the system can use colors or not"
if color and sys.stdout.isatty():
try:
import curses curses.setupterm()
if curses.tigetnum('colors') < 0: return False
except:
print >>sys.stderr, 'Color support is disabled, python-curses is not installed.'
return False
return color
----
If you have a better implementation or any suggestion, feel free to
provide that information rather than pointing in a general direction...
Thanks in advance,
--
-- dag wieers, <email address hidden>, http://dag.wieers.com/ --
[Any errors in spelling, tact or fact are transmission errors]
On Wed, 13 Oct 2010, Maxime Ritter wrote:
> Ok, in fact it is working ; the TERM environment variable was wrongly
> set up.
>
> So the real bug are :
> - why does dstat complain about missing python-curses instead of a wrong TERM environnement ? (not an ubuntu bug)
> - why is the default xubuntu terminal application reporting a wrong TERM ? (Bug #659023)
>
> So we can close this bug.
>
> ** Changed in: dstat (Ubuntu)
> Status: New => Invalid
Quite easy, the block that tests for a functional curses apparently fails
on Ubuntu 10.10. What TERM was set in this case so I can reproduce the
problem and see if another error message makes any sense in this case ?
---- color=True) : isatty( ):
curses. setupterm( ) tigetnum( 'colors' ) < 0:
return False
def gettermcolor(
"Return whether the system can use colors or not"
if color and sys.stdout.
try:
import curses
if curses.
except:
print >>sys.stderr, 'Color support is disabled, python-curses is not installed.'
return False
return color
----
If you have a better implementation or any suggestion, feel free to
provide that information rather than pointing in a general direction...
Thanks in advance, dag.wieers. com/ --
--
-- dag wieers, <email address hidden>, http://
[Any errors in spelling, tact or fact are transmission errors]