#1484 closed defect (fixed)

CLI: overzealous quoting of error messages

Reported by: davidsarah Owned by: davidsarah
Priority: major Milestone: 1.10.0
Component: code-frontend-cli Version: 1.8.2
Keywords: error quoting escaping regression usability reviewed Cc:
Launchpad Bug:

Description

When the CLI prints error messages from the gateway (mainly, but not always, in 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:

Change History (9)

comment:1 Changed at 2011-10-20T18:03:57Z by davidsarah

  • Milestone changed from soon to 1.10.0
  • Owner set to davidsarah
  • Status changed from new to assigned

comment:2 Changed at 2011-11-19T01:59:19Z by davidsarah

  • Keywords escaping added

comment:3 Changed at 2012-02-17T22:30:42Z by davidsarah

  • Keywords regression added

This bug sucks more than I thought, because it scrunches information about nested exceptions onto long unreadable lines (such as in the Description of #1670, which I edited to replace '\x0a's with newlines). It's already in the 1.10 milestone but I want to remind myself to fix it, also because it's a regression caused by being more careful about escaping generally since 1.7 or so.

comment:4 Changed at 2012-02-17T22:32:01Z by davidsarah

  • Keywords usability added

comment:5 Changed at 2012-04-01T03:51:58Z by davidsarah

  • Milestone changed from 1.11.0 to 1.10.0

comment:6 Changed at 2012-11-15T01:54:37Z by davidsarah

Reminder to self that I really really don't want to let this one slip for 1.10.

comment:7 Changed at 2013-01-04T05:34:49Z by davidsarah

  • Keywords review-needed added
  • Owner changed from davidsarah to zooko
  • Status changed from assigned to new
Last edited at 2013-01-04T05:36:41Z by davidsarah (previous) (diff)

comment:8 Changed at 2013-02-01T03:07:19Z by davidsarah

  • Keywords reviewed added; review-needed removed
  • Owner changed from zooko to davidsarah
  • Status changed from new to assigned

comment:9 Changed at 2013-03-07T17:01:26Z by davidsarah

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in 07c26ff8 and ea9dfb0d.

Note: See TracTickets for help on using tickets.