On 17.6.2016 08:43, Stanislav Laznicka wrote:
> On 06/17/2016 07:45 AM, Petr Spacek wrote:
>> On 16.6.2016 17:33, Stanislav Laznicka wrote:
>>> Hello,
>>>
>>> This patch removes most sys.exits() from installer modules and scripts and
>>> replaces them with ScriptError. I only left sys.exits at places where the 
>>> user
>>> decides yes/no on continuation of the script.
>> I wonder if yes/no should be replaced with KeyboardInterrupt or some other
>> exception, too...
>>
> I'm not sure, it seems more clear to just really exit if the user desires it
> and it's what we say we'll do (with possible cleanup beforehand). Do you think
> we could benefit somehow by raising an exception here?

I'm just thinking out loud.

It seemed to me that it is easier to share cleanup on one except block instead
of having if (interrupt): cleanup; if (interrupt2): same_cleanup;

etc.

Again, just wondering out loud.

-- 
Petr^2 Spacek

-- 
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

Reply via email to