mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 15:55:47 -05:00
py3: create DNS zonefile: use textual mode
Also code was rewritten to use NamedTemporaryFile with context https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
committed by
Jan Cholasta
parent
47f912e16b
commit
488d01ced7
@@ -670,10 +670,13 @@ class BindInstance(service.Service):
|
||||
system_records.get_base_records()
|
||||
)
|
||||
)
|
||||
[fd, name] = tempfile.mkstemp(".db","ipa.system.records.")
|
||||
os.write(fd, text)
|
||||
os.close(fd)
|
||||
print("Please add records in this file to your DNS system:", name)
|
||||
with tempfile.NamedTemporaryFile(
|
||||
mode="w", prefix="ipa.system.records.",
|
||||
suffix=".db", delete=False
|
||||
) as f:
|
||||
f.write(text)
|
||||
print("Please add records in this file to your DNS system:",
|
||||
f.name)
|
||||
|
||||
def create_instance(self):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user