On 08/02/2016 01:08 PM, Stanislav Laznicka wrote:
On 07/28/2016 10:57 AM, Martin Basti wrote:
Hello,
suprisingly, patch needs rebase :)
1)
Is the script error the right Exception?
I chose ScriptError because it's able to change the return value of
the script, which is necessary sometimes. RuntimeError, which may seem
more suitable, would not be able to do that. However, I am open for
ideas on which exception type to use.
2)
Can you use rather raise Exception(), instead of raise Exception
Sure, please see the modified attached patch.
3)
I really hate to print errors to STDOUT from modules and then just
call exit(1) (duplicated evil), could you replace print('xxx') with
raise AnException('xxx')
Did that, only kept those prints printing directly to stderr. Not sure
if those should be changed as well.
Bumping for review/opinions.
--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code