FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Development

 
 
LinkBack Thread Tools
 
Old 03-12-2009, 05:02 PM
David Lehman
 
Default Do not write "Running..." to stdout, as that could be tty1.

Ack.

On Thu, 2009-03-12 at 10:31 -0400, Chris Lumens wrote:
> Doing so sends a whole lot of spew to tty1 which not only looks bad, but
> makes VNC and text installs look even worse than they already are. Also,
> let's write output from execWithPulseProgress to the program.log too.
> ---
> iutil.py | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/iutil.py b/iutil.py
> index d9e8a77..221504f 100644
> --- a/iutil.py
> +++ b/iutil.py
> @@ -80,7 +80,6 @@ def execWithRedirect(command, argv, stdin = None, stdout = None,
>
> runningLog = open("/tmp/program.log", "a")
> runningLog.write("Running... %s
" % ([command] + argv,))
> - os.write(stdout, "Running... %s
" %([command] + argv,))
>
> try:
> proc = subprocess.Popen([command] + argv, stdin=stdin,
> @@ -197,7 +196,8 @@ def execWithPulseProgress(command, argv, stdin = None, stdout = None,
> elif stderr is None or not isinstance(stderr, file):
> stderr = sys.stderr.fileno()
>
> - os.write(stdout, "Running... %s
" %([command] + argv,))
> + runningLog = open("/tmp/program.log", "a")
> + runningLog.write("Running... %s
" % ([command] + argv,))
>
> p = os.pipe()
> childpid = os.fork()
> @@ -224,6 +224,7 @@ def execWithPulseProgress(command, argv, stdin = None, stdout = None,
> raise IOError, args
>
> os.write(stdout, s)
> + runningLog.write(s)
> if progress: progress.pulse()
>
> if len(s) < 1:

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 11:38 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org