updated syntax in directory.py to make whole allmydata.web python3 compatible

This commit is contained in:
heartsucker 2019-03-22 18:03:34 +01:00
parent 5adde83acf
commit be910fe269
No known key found for this signature in database
GPG Key ID: C49FAAAA25756E79

View File

@ -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