Browse Source

Fix variable name clash

main
decentral1se 1 year ago
parent
commit
cc0bcb5af0
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 12
      etherpump/commands/pull.py

12
etherpump/commands/pull.py

@ -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…
Cancel
Save