On Sun, Feb 11, 2001 at 03:22:20PM +0100, Tomás García Ferrari wrote:
> Hi,
> 
> I'm attemting to make a script that runs up2date -l and send me an email
> with the result, so I can set it to run from a crontab. I'm using this
> command
> 
> > up2date -l | /bin/mail -s "up2date repport" [EMAIL PROTECTED]
> 
> But I receive this on my mail:
> 
> > Retrieving list of all available packages...
> > 
> > Removing installed packages from list of updates...
> > 0.081%
> > 0.162%
> > 0.243%
> > 0.324%
> > [and so on... up to 100%...]
> 
> which is too much!
> How can I avoid this 0-to-100% counting on my e-mail?

        This is fixed in the next version. It checks to see
if your running on a tty before attempting to print out the
%'s. ie, something like:

    # detect if were running on a tty or not
    global isatty
    if sys.stdout.isatty():
            isatty = 1
    else:
            isatty = None

   
   and then in the percent() callback, something like:
        if isatty:
                print percent magic stuff...


Adrian



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to