From 088fcff442713a95e685af5a37d80edb13005790 Mon Sep 17 00:00:00 2001 From: meejah Date: Mon, 24 Feb 2020 08:11:50 -0700 Subject: [PATCH] better formatting --- src/allmydata/web/directory.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/allmydata/web/directory.py b/src/allmydata/web/directory.py index e9cf33b8c..3b9a9c1db 100644 --- a/src/allmydata/web/directory.py +++ b/src/allmydata/web/directory.py @@ -21,7 +21,10 @@ from hyperlink import URL from twisted.python.filepath import FilePath from allmydata.util import base32 -from allmydata.util.encodingutil import to_str +from allmydata.util.encodingutil import ( + to_str, + quote_output, +) from allmydata.uri import ( from_string_dirnode, from_string, @@ -192,7 +195,9 @@ class DirectoryNodeHandler(ReplaceMeMixin, Resource, object): # file in the way. return ErrorPage( http.CONFLICT, - "Unable to create directory '{}': a file was in the way".format(name), + "Unable to create directory {}: a file was in the way".format( + quote_output(name) + ), "no details", ) return make_handler_for(node, self.client, self.node, name)