[Freeipa-devel] [PATCH 0064] Check if IPA is configured before attempting a winsync migration

Gabe Alford redhatrises at gmail.com
Fri Nov 20 18:10:10 UTC 2015


Thanks. Updated patch attached.


Gabe

On Fri, Nov 20, 2015 at 10:36 AM, Martin Babinsky <mbabinsk at redhat.com>
wrote:

> On 11/20/2015 04:02 PM, Gabe Alford wrote:
>
>> Hello,
>>
>> Fix for https://fedorahosted.org/freeipa/ticket/5470
>>
>> Thanks,
>>
>> Gabe
>>
>>
>> Hi Gabe,
>
> patch looks good. IMHO it would be better if you moved the check before
> API initialization like so:
>
> """
> @@ -340,6 +340,12 @@ class WinsyncMigrate(admintool.AdminTool):
>          the plumbing.
>          """
>
> +        # Check if the IPA server is configured before attempting to
> migrate
> +        try:
> +            installutils.check_server_configuration()
> +        except RuntimeError as e:
> +            sys.exit(e)
> +
>          # Finalize API
>          api.bootstrap(in_server=True, context='server')
>          api.finalize()
> """
>
> There's no point in initializing API if there is no server installed.
>
> --
> Martin^3 Babinsky
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151120/4319e6bb/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-rga-0064-2-Check-if-IPA-is-configured-before-attempting-a-winsy.patch
Type: text/x-patch
Size: 1424 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151120/4319e6bb/attachment.bin>


More information about the Freeipa-devel mailing list