From be910fe269679e27a6667fca594da5b2c0d48d83 Mon Sep 17 00:00:00 2001 From: heartsucker Date: Fri, 22 Mar 2019 18:03:34 +0100 Subject: [PATCH] updated syntax in directory.py to make whole allmydata.web python3 compatible --- src/allmydata/web/directory.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/allmydata/web/directory.py b/src/allmydata/web/directory.py index 1cfd7a17b..a08e89f32 100644 --- a/src/allmydata/web/directory.py +++ b/src/allmydata/web/directory.py @@ -539,7 +539,7 @@ class DirectoryNodeHandler(RenderMixin, rend.Page, ReplaceMeMixin): body = req.content.read() try: children = json.loads(body) - except ValueError, le: + except ValueError as le: le.args = tuple(le.args + (body,)) # TODO test handling of bad JSON raise @@ -1017,7 +1017,8 @@ class ManifestResults(MultiFormatPage, ReloadMixin): def data_items(self, ctx, data): return self.monitor.get_status()["manifest"] - def render_row(self, ctx, (path, cap)): + def render_row(self, ctx, path_cap): + path, cap = path_cap ctx.fillSlots("path", self.slashify_path(path)) root = get_root(ctx) # TODO: we need a clean consistent way to get the type of a cap string