Replace some ctx names with req

This commit is contained in:
Jean-Paul Calderone 2020-10-21 10:12:48 -04:00
parent 37c9ee6c5d
commit 14b9dc090d
3 changed files with 4 additions and 6 deletions

View File

@ -522,9 +522,9 @@ class DirectoryNodeHandler(ReplaceMeMixin, Resource, object):
d.addCallback(self._maybe_literal, CheckResultsRenderer)
return d
def _start_operation(self, monitor, renderer, ctx):
self._operations.add_monitor(ctx, monitor, renderer)
return self._operations.redirect_to(ctx)
def _start_operation(self, monitor, renderer, req):
self._operations.add_monitor(req, monitor, renderer)
return self._operations.redirect_to(req)
def _POST_start_deep_check(self, req):
# check this directory and everything reachable from it

View File

@ -152,8 +152,6 @@ class ReloadMixin(object):
def refresh(self, req, tag):
if self.monitor.is_finished():
return ""
# dreid suggests ctx.tag(**dict([("http-equiv", "refresh")]))
# but I can't tell if he's joking or not
tag.attributes["http-equiv"] = "refresh"
tag.attributes["content"] = str(self.REFRESH_TIME)
return tag

View File

@ -189,7 +189,7 @@ class FileHandler(resource.Resource, object):
return filenode.FileNodeDownloadHandler(self.client, node)
@render_exception
def render_GET(self, ctx):
def render_GET(self, req):
raise WebError("/file must be followed by a file-cap and a name",
http.NOT_FOUND)