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 authored and Martin Kosek committed 2015-01-09 13:30:37 +01:00
1 parent bb405bd972
commit af6aece39b
1 file changed
+4
+4
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, [])