use % instead of format

This commit is contained in:
meejah 2020-02-13 06:21:33 -07:00
parent 3d3feec059
commit f9e3fdfaee

View File

@ -154,17 +154,13 @@ class FileNodeHandler(Resource, ReplaceMeMixin, object):
if should_create_intermediate_directories(req): if should_create_intermediate_directories(req):
return ErrorPage( return ErrorPage(
http.CONFLICT, http.CONFLICT,
u"Cannot create directory {}, because its " u"Cannot create directory %s, because its parent is a file, "
u"parent is a file, not a directory".format( u"not a directory" % quote_output(name, encoding='utf-8'),
quote_output(name, encoding='utf-8')
),
"no details" "no details"
) )
return ErrorPage( return ErrorPage(
http.BAD_REQUEST, http.BAD_REQUEST,
u"Files have no children named {}".format( u"Files have no children named %s" % quote_output(name, encoding='utf-8'),
quote_output(name, encoding='utf-8'),
),
"no details", "no details",
) )