Fix zone find during forwardzone upgrade

https://fedorahosted.org/freeipa/ticket/4818

Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
Martin Basti
2015-01-07 13:21:04 +01:00
committed by Martin Kosek
parent bb405bd972
commit af6aece39b

View File

@@ -198,12 +198,16 @@ class update_master_to_dnsforwardzones(PostUpdate):
# fwzones exist, do not execute upgrade again
return (False, False, [])
zones = []
try:
# raw values are required to store into ldif
zones = api.Command.dnszone_find(all=True,
raw=True,
sizelimit=0)['result']
except errors.NotFound:
pass
if not zones:
self.log.info('No DNS zone to update found')
return (False, False, [])