From de999126413b4e782d521c3e09373d20f01ef13a Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 15 Jun 2020 15:17:43 -0400 Subject: [PATCH] Replace `ctx` references with `req` references --- src/allmydata/web/check_results.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/allmydata/web/check_results.py b/src/allmydata/web/check_results.py index 248c771a8..af12fa370 100644 --- a/src/allmydata/web/check_results.py +++ b/src/allmydata/web/check_results.py @@ -203,18 +203,17 @@ class ResultsBase(object): assert isinstance(s, (list, tuple)) return [html.escape(w) for w in s] - def want_json(self, ctx): - output = get_arg(inevow.IRequest(ctx), "output", "").lower() + def want_json(self, req): + output = get_arg(req, "output", "").lower() if output.lower() == "json": return True return False - def _render_si_link(self, ctx, storage_index): + def _render_si_link(self, req, storage_index): si_s = base32.b2a(storage_index) - req = inevow.IRequest(ctx) ophandle = req.prepath[-1] - target = "%s/operations/%s/%s" % (get_root(ctx), ophandle, si_s) - output = get_arg(ctx, "output") + target = "%s/operations/%s/%s" % (get_root(req), ophandle, si_s) + output = get_arg(req, "output") if output: target = target + "?output=%s" % output return tags.a(si_s, href=target)