From cc0bcb5af08e983cd9f4952b94949c8ed9eb388f Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sat, 12 Dec 2020 16:42:46 +0100 Subject: [PATCH] Fix variable name clash --- etherpump/commands/pull.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/etherpump/commands/pull.py b/etherpump/commands/pull.py index 57176cf..5eeecfb 100644 --- a/etherpump/commands/pull.py +++ b/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