Fix variable name clash
This commit is contained in:
parent
c56e3f668c
commit
cc0bcb5af0
@ -434,17 +434,17 @@ async def handle_pad(args, padid, data, info, session):
|
|||||||
if args.all or args.dhtml:
|
if args.all or args.dhtml:
|
||||||
data["startRev"] = "0"
|
data["startRev"] = "0"
|
||||||
url = info["localapiurl"] + "createDiffHTML?" + urlencode(data)
|
url = info["localapiurl"] + "createDiffHTML?" + urlencode(data)
|
||||||
html = await agetjson(session, url)
|
dhtml = await agetjson(session, url)
|
||||||
ver = {"type": "diffhtml"}
|
ver = {"type": "diffhtml"}
|
||||||
versions.append(ver)
|
versions.append(ver)
|
||||||
ver["code"] = html["_code"]
|
ver["code"] = dhtml["_code"]
|
||||||
if html["_code"] == 200:
|
if dhtml["_code"] == 200:
|
||||||
try:
|
try:
|
||||||
html = html["data"]["html"]
|
dhtml_body = dhtml["data"]["html"]
|
||||||
ver["path"] = p + ".diff.html"
|
ver["path"] = p + ".diff.html"
|
||||||
ver["url"] = quote(ver["path"])
|
ver["url"] = quote(ver["path"])
|
||||||
doc = html5lib.parse(
|
doc = html5lib.parse(
|
||||||
html, treebuilder="etree", namespaceHTMLElements=False
|
dhtml_body, treebuilder="etree", namespaceHTMLElements=False
|
||||||
)
|
)
|
||||||
html5tidy(
|
html5tidy(
|
||||||
doc,
|
doc,
|
||||||
@ -457,7 +457,7 @@ async def handle_pad(args, padid, data, info, session):
|
|||||||
output = ET.tostring(doc, method="html", encoding="unicode")
|
output = ET.tostring(doc, method="html", encoding="unicode")
|
||||||
await f.write(output)
|
await f.write(output)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
ver["message"] = html["message"]
|
ver["message"] = dhtml["message"]
|
||||||
|
|
||||||
# Process text, html, dhtml, magicwords and all options
|
# Process text, html, dhtml, magicwords and all options
|
||||||
downloaded_html = False
|
downloaded_html = False
|
||||||
|
Loading…
Reference in New Issue
Block a user