Some thoughts on LMIShell and scripton development
Stephen Gallagher
sgallagh at redhat.com
Wed Apr 3 12:14:26 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed 03 Apr 2013 02:55:28 AM EDT, Peter Hatina wrote:
> Hi,
>
> On 04/01/2013 09:16 PM, Stephen Gallagher wrote:
>> Scriptons should follow standard Python recommendations for
>> return values and exceptions. We should make an attempt to
>> properly handle any expected exceptions (such as network errors)
>> at all levels (both in scriptons and OpenLMI)
>
> Wrt shell, I was not 100% sure, if to use exceptions or not. I
> know python uses them as often as possible, but from the user point
> of view, I wanted to avoid them (they can be turned on in the
> running shell), because of the stack trace etc, when an error
> occurs (are the lmishell users programmers?). Maybe I could drop
> the code, which "traps" the exceptions and packs them into classic
> C-return values, if we are OK with that.
>
That's a really interesting question. I was thinking that, since the
scriptons are python code, we should aim very closely at maintaining a
"pythonic" way of doing things. There's certainly an argument to be
made for having the scriptons behave a little more like bash scripts,
though.
I'd like to hear more opinions on this, ideally from people who might
eventually consume these scriptons. What would they like to see?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlFcHSIACgkQeiVVYja6o6OWRQCeKSC35f+tmiU64DgM3uwzzd+J
hyYAn0tbFzZglQtxwCYQQ4+2OH90Hntl
=xKr0
-----END PGP SIGNATURE-----
More information about the openlmi-devel
mailing list