[mod] raw string for correct escape sequence

This commit is contained in:
Laurent Peuch 2019-08-27 19:45:45 +02:00
parent 87435775ee
commit 2aa5e7f640

View file

@ -279,7 +279,7 @@ def dyndns_update(operation_logger, dyn_host="dyndns.yunohost.org", domain=None,
# should be muc.the.domain.tld. or the.domain.tld # should be muc.the.domain.tld. or the.domain.tld
if record["value"] == "@": if record["value"] == "@":
record["value"] = domain record["value"] = domain
record["value"] = record["value"].replace(";", "\;") record["value"] = record["value"].replace(";", r"\;")
action = "update add {name}.{domain}. {ttl} {type} {value}".format(domain=domain, **record) action = "update add {name}.{domain}. {ttl} {type} {value}".format(domain=domain, **record)
action = action.replace(" @.", " ") action = action.replace(" @.", " ")