[Fedora-livecd-list] Revised: [PATCH] turboLiveInst - improves livecd/usb installer speed by 15-20+%

Colin Walters walters at redhat.com
Tue Sep 4 13:49:42 UTC 2007


On 9/4/07, Mark McLoughlin <markmc at redhat.com> wrote:
>
>
>     (status, output) = commands.getstatusoutput("/sbin/dumpe2fs -h
> /dev/root")



Not directly related to your discussion, but personally I am fairly
fanatical about never involving /bin/sh in - well, anything if I can avoid
it =)  Here it will be fine, but then maybe someone comes along later and
wants to add a user-passed parameter to the command, and then you need to
quote (if it's even remembered, and if it's not then you have weird failures
and in other software security problems).

The "subprocess" module is the fix:

output = subprocess.Popen(['/sbin/dumpe2fs', '-h', '/dev/root'], stdout=
subprocess.PIPE).communicate()[0]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-livecd-list/attachments/20070904/5a4de2a6/attachment.htm>


More information about the Fedora-livecd-list mailing list