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