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

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

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


From: James Marsh
Subject: [rdiff-backup-users] rdiff-backup-statistics mangles stdout
Date: Sun, 11 May 2008 19:00:48 +0100

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?

Best wishes,
James


reply via email to

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