[tahoe-lafs-trac-stream] [tahoe-lafs] #1484: CLI: overzealous quoting of error messages
tahoe-lafs
trac at tahoe-lafs.org
Thu Nov 15 01:54:40 UTC 2012
#1484: CLI: overzealous quoting of error messages
-------------------------+-------------------------------------------------
Reporter: | Owner: davidsarah
davidsarah | Status: assigned
Type: defect | Milestone: 1.10.0
Priority: major | Version: 1.8.2
Component: code- | Keywords: error quoting escaping regression
frontend-cli | usability
Resolution: |
Launchpad Bug: |
-------------------------+-------------------------------------------------
Old description:
> When the CLI prints error messages from the gateway (mainly, but not
> always, in [source:src/allmydata/scripts/common_http.py at 4538#L74
> format_http_error]), it does so using {{{quote_output(message,
> quotemarks=False)}}}. This would be correct if the message were expected
> to be a single line, but since it is usually multi-line, the LFs are
> treated as control characters and escaped as {{{\x0a}}}. For example:
>
> {{{
> Error: 500 Internal Server Error
> "Traceback (most recent call last):\x0aFailure:
> allmydata.mutable.common.UncoordinatedWriteError: \x0a"
> }}}
> instead of the intended (albeit still ugly for other reasons):
> {{{
> Error: 500 Internal Server Error
> Traceback (most recent call last):
> Failure: allmydata.mutable.common.UncoordinatedWriteError:
> }}}
New description:
When the CLI prints error messages from the gateway (mainly, but not
always, in [source:src/allmydata/scripts/common_http.py at 4538#L74
format_http_error]), it does so using {{{quote_output(message,
quotemarks=False)}}}. This would be correct if the message were expected
to be a single line, but since it is usually multi-line, the LFs are
treated as control characters and escaped as {{{\x0a}}}. For example:
{{{
Error: 500 Internal Server Error
"Traceback (most recent call last):\x0aFailure:
allmydata.mutable.common.UncoordinatedWriteError: \x0a"
}}}
instead of the intended (albeit still ugly for other reasons):
{{{
Error: 500 Internal Server Error
Traceback (most recent call last):
Failure: allmydata.mutable.common.UncoordinatedWriteError:
}}}
--
Comment (by davidsarah):
Reminder to self that I really really don't want to let this one slip for
1.10.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1484#comment:6>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list