On 10/14/10 01:05 PM, [email protected] wrote:
On 10/14/10 03:02 AM, Jan Damborsky wrote:
Hi Keith,

On 10/13/10 06:36 PM, 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.

Good point. I went with what Bart suggests, since I think it handles
all kind of potential failures.

If you are interested, I have updated the webrev with those changes:
http://cr.opensolaris.org/~dambi/bug-6991546/

Thank you for review !
Jan

_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Hey Jan,

Would it be better to trap on IndexError instead of StandardError?

Hey Joe,

to be honest, I am not sure. I chose StandardError, as it has broader scope
and we want to catch everything.
Looking at the exception hierarchy [1], the related portion looks like

StandardError
+--TypeError
+-- LookupError
    +-- IndexError
    +-- KeyError

Is IndexError the only exception which could be raised ?
If this is the case, then I agree it is better to go with more specific
IndexError.

Thank you,
Jan


[1] http://docs.python.org/library/exceptions.html

_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to