[Freeipa-devel] [PATCH] 0003 Handle SSSD restart crash more gently.

Martin Kosek mkosek at redhat.com
Tue Aug 14 07:26:03 UTC 2012


On 08/07/2012 06:14 PM, Tomas Babej wrote:
> Sorry, I forgot to attach the patch.
> 
> ----- Original Message -----
> From: "Tomas Babej" <tbabej at redhat.com>
> To: freeipa-devel at redhat.com
> Sent: Tuesday, August 7, 2012 5:58:32 PM
> Subject: [PATCH] Handle SSSD restart crash more gently.
> 
> Hi,
> 
> In ipa-client-install, failure of restart of sssd service no longer
> causes the crash of the install process. Adds a warning message to
> the root logger instead.
> 
> https://fedorahosted.org/freeipa/ticket/2827
> 
> Tomas
> 

This works fine, I see just one issue. It is better to catch for more specific
exceptions that with the bare "except" clause. Otherwise for example in this
case, if the sssd restart would got stuck, one could not CTRL+C it properly as
the bare except clause would catch the appropriate exception. You may want to
check with PEP8 on that one.

I would suggest rather catching CalledProcessError only.

Martin




More information about the Freeipa-devel mailing list