On 10/13/10 09:36, Keith Mitchell wrote:
Hi Jan,

It'd be better to check status and len() of the output before splitting
the output - if the command errors out and returns an empty string for
status, the "co[0].split()[1]" command will fail.

<just happened to be driving by...>

Alternatively, assume that things will work, but catch the resulting
exception instead.

Also, if you put the status check & perror calls in an function,
you can trim many lines of repeated code.

- Bart

--
Bart Smaalders                  Solaris Kernel Performance
[email protected]       http://blogs.sun.com/barts
"You will contribute more with mercurial than with thunderbird."
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to