rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] rdiff-backup-statistics mangles stdout


From: Andrew Ferguson
Subject: Re: [rdiff-backup-users] rdiff-backup-statistics mangles stdout
Date: Wed, 11 Jun 2008 15:41:11 -0400

On May 11, 2008, at 2:00 PM, James Marsh wrote:

Hi all,

I've found a small bug when rdiff-backup-statistics is redirected it mangles its output. In my case I'm running it in a cron job.

Looking at the code, this is because the system calls are interleaved with its own printed output but without flushing stdout first.

The following fixes this:

def system(cmd):
    sys.stdout.flush()
if os.system(cmd): sys.exit("Error running command '%s'\n" % (cmd,))

Could I also suggest the lines printing "Processing statistics from session..." are redirected to stderr or a commandline "quiet" switch is added to suppress them as they aren't very useful?

Hi James,

I have added both of these to the CVS version of rdiff-backup- statistics. It now has a --quiet option to suppress those output lines.


Andrew




reply via email to

[Prev in Thread] Current Thread [Next in Thread]