[Freeipa-devel] [PATCH] 0040 Move install script error handling to a common function

Petr Viktorin pviktori at redhat.com
Tue May 22 13:45:58 UTC 2012


On 2012-04-23 17:05, John Dennis wrote:
> On 04/23/2012 05:19 AM, Petr Viktorin wrote:
>> This fixes https://fedorahosted.org/freeipa/ticket/2071 (Add final debug
>> message in installers).
>>
>> I submitted an earlier version of this patch before (0014), but it was
>> too much to include in 2.2. Hopefully now there's more space for
>> restructuring. I think it's better to start a new thread with this
>> approach.
>>
>> The try/except blocks at the end of installers/management scripts are
>> replaced by a call to a common function, which includes the final
>> message.
>> For each specific error, the error handlers in all scripts was almost
>> the same, but each script handled a different selection of errors.
>> Instead of having this copy/pasted code (with subtle differences
>> creeping in over time), this patch consolidates it all in one place.
>
> I like this approach much better than the earlier patch, great, thanks.
> I'm a big fan of calling into common code instead of copying code to my
> mind the refactoring to utilize common code is great approach. I also
> like the fact the logging configuration is not modified after it's
> established.
>
> At some point we may want to revist how the log messages are generated.
> For example should all communication to the console pass through the
> console handler? Is there a logger established for the script? Should
> the format of messages emitted to the console be altered? Should all
> command line utilities accept the both the verbose and debug flag? Etc.
> But for now this is fantastic start in the right direction.
>
> I have not installed and exercised the patch so I can't comment on any
> runtime time issues that might be present, but from code inspection only
> it has my ACK.
>
>
Thanks John!
Yes, this is just a start.


Patch rebased to curent master

-- 
Petr³
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0040-02-Move-install-script-error-handling-to-a-common-funct.patch
Type: text/x-patch
Size: 35284 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120522/e7507684/attachment.bin>


More information about the Freeipa-devel mailing list