[Fedora-livecd-list] [PATCH] disable mksquashfs progress bar for non-interactive sessions
Jeremy Katz
katzj at redhat.com
Mon Sep 24 00:31:51 UTC 2007
On Sun, 2007-09-23 at 05:31 -0500, Douglas McClendon wrote:
> This patch introduces a global variable 'interactive' which is defined
> as true if stdout of livecd-creator is attached to a tty. This global
> is then used to add the -no-progress option to mksquashfs for
> non-interactive sessions. Thus making logfiles created by redirecting
> the output of livecd-creator, reasonably readable (e.g. with less).
I'm not sure how useful it really is as a global when we're using it for
one thing. If we find more places that we want it, I might be convinced
to make it more generally accessible, but until then, it just feels a
little bit like polluting the namespace.
Also, the more pythonic way to check is looking at sys.stdout.isatty()
rather than os.isatty(Fdno) -- makes it a little bit more obvious to
those who don't instinctively know "well duh, fd 1 is stdout"
Jeremy
More information about the livecd
mailing list