On Wed, 20 Apr 2005, Marc Lehmann wrote:

> Package: dstat
> Version: 0.5.10-1
> Severity: minor
> 
> 
> When pressing ^C shortly after startup (on some of my systems "shortly"
> means within 10 seconds after starting it), dstat outputs an obscure
> message and continues:
> 
>    doom ~# dstat -Dha,hdb,hdc
> < ^C pressed here
>    'import site' failed; use -v for traceback
>    ----total-cpu-usage---- --disk/hdb----disk/hdc- -net/total- ---paging-- 
> ---system--
>    usr sys idl wai hiq siq|_read write _read write|_recv _send|__in_ 
> _out_|_int_ _csw_
>     89   6   3   2   0   1|   0     0 :   0     0 |   0     0 |   0     0 |   
> 0     0 

I can repeat this, but it's more like within the first miliseconds.

        [EMAIL PROTECTED] ~]# dstat
        Traceback (most recent call last):
          File "/usr/bin/dstat", line 26, in ?
            import curses, termios
          File "/usr/lib/python2.3/curses/__init__.py", line 15, in ?
            from _curses import *
        KeyboardInterrupt
or

        [EMAIL PROTECTED] ~]# dstat
        Traceback (most recent call last):
          File "/usr/bin/dstat", line 24, in ?
            import os, re, getopt, time, types
          File "/usr/lib/python2.3/re.py", line 5, in ?
            from sre import *
          File "/usr/lib/python2.3/sre.py", line 98, in ?
            import sre_parse
          File "/usr/lib/python2.3/sre_parse.py", line 221, in ?
            def isname(name):
        KeyboardInterrupt

If you look at the code I'm only intercepting exceptions after the python 
modules are imported and as you can see from the traceback, each of these 
exceptions were raised during thise phase.

I'm not sure if the proper thing to do is to import the python modules 
within my try-block. I noticed eg. that yum only imports sys before 
importing everything else in a try-block. Which reduces the chance of 
being hit by this.

I'll look into it.
--   dag wieers,  [EMAIL PROTECTED],  http://dag.wieers.com/   --
[all I want is a warm bed and a kind word and unlimited power]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to