On Fri, Apr 04, 2008 at 06:35:49PM -0600, Tim Knitter wrote:
>
>> - line 152: I don't think you got the point of "don't use os.system()".
>
> I thought you said to use subprocess? I'd appreciate an example if this
> subprocess command isn't right. thanks
>
>> The point is to *not* use the shell. In addition, the command need
>
> Using the shell was the only way it worked on my indiana release. I tried
> many different alterations but none worked.
cmd = [ "bootadm", "update-archive", "-R" ]
try:
ret = subprocess.call(cmd + [ self.clone_dir ],
stdout = file("/dev/null"), stderr = subprocess.STDOUT)
except OSError, e:
complain()
if ret != 0:
complain()
It would likely be useful to capture the command's output and spit it out
if the return code isn't 0, but this should do what you'd originally
written.
>> only be defined in one place, and should use an absolute pathname,
>
> The command is different thus two definitions. One uses clone_dir and the
> other root
Ah, I failed to notice that. You can hardcode the two lists, or do what I
did above.
Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss